Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1380770

Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info
Date 2016-04-17 17:40 +0200
Message-ID <roWXN-6zk-31@gated-at.bofh.it> (permalink)
References <roHcm-2nN-3@gated-at.bofh.it> <roHcm-2nN-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> @@ -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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-17 00:50 +0200
  Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info Andrew Lunn <andrew@lunn.ch> - 2016-04-17 17:40 +0200
    Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-17 18:40 +0200

csiph-web