Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751216AbcDQPfp (ORCPT ); Sun, 17 Apr 2016 11:35:45 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:38249 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbcDQPfo (ORCPT ); Sun, 17 Apr 2016 11:35:44 -0400 Date: Sun, 17 Apr 2016 17:35:41 +0200 From: Andrew Lunn To: Vivien Didelot Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" , Florian Fainelli Subject: Re: [PATCH net-next v3 4/8] net: dsa: mv88e6xxx: add switch info Message-ID: <20160417153541.GC907@lunn.ch> References: <1460846505-20305-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1460846505-20305-5-git-send-email-vivien.didelot@savoirfairelinux.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460846505-20305-5-git-send-email-vivien.didelot@savoirfairelinux.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 499 Lines: 19 > @@ -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