From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@savoirfairelinux.com,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>
Subject: Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info
Date: Sun, 17 Apr 2016 17:35:41 +0200 [thread overview]
Message-ID: <20160417153541.GC907@lunn.ch> (raw)
In-Reply-To: <1460846505-20305-5-git-send-email-vivien.didelot@savoirfairelinux.com>
> @@ -3100,16 +3100,19 @@ char *mv88e6xxx_drv_probe(struct device *dsa_dev, struct device *host_dev,
> prod_num = (id & 0xfff0) >> 4;
> rev = id & 0x000f;
>
> - name = mv88e6xxx_lookup_name(id, table, num);
> - if (!name)
> + info = mv88e6xxx_lookup_info(prod_num, table, num);
> + if (!info)
> return NULL;
>
> + name = (char *) info->name;
> +
Hi Vivien
Casting off the const is not so nice. How about adding in another
patch to change the API to return a const char *.
Andrew
next prev parent reply other threads:[~2016-04-17 15:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-16 22:41 [PATCH net-next v3 0/8] net: dsa: mv88e6xxx: factorize switch info Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 1/8] net: dsa: mv88e6xxx: drop double ds assignment Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 2/8] net: dsa: mv88e6xxx: drop revision probing Vivien Didelot
2016-04-17 15:24 ` Andrew Lunn
2016-04-16 22:41 ` [PATCH net-next v3 3/8] net: dsa: mv88e6xxx: read switch ID in probe Vivien Didelot
2016-04-17 15:26 ` Andrew Lunn
2016-04-16 22:41 ` [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info Vivien Didelot
2016-04-17 15:35 ` Andrew Lunn [this message]
2016-04-17 16:37 ` Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 5/8] net: dsa: mv88e6xxx: add family to info Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 6/8] net: dsa: mv88e6xxx: add number of ports " Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 7/8] net: dsa: mv88e6xxx: add number of db " Vivien Didelot
2016-04-16 22:41 ` [PATCH net-next v3 8/8] net: dsa: mv88e6xxx: remove switch ID from ps Vivien Didelot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160417153541.GC907@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kernel@savoirfairelinux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.