Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751447AbcDQQiA (ORCPT ); Sun, 17 Apr 2016 12:38:00 -0400 Received: from mail.savoirfairelinux.com ([208.88.110.44]:48757 "EHLO mail.savoirfairelinux.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbcDQQh7 (ORCPT ); Sun, 17 Apr 2016 12:37:59 -0400 From: Vivien Didelot To: Andrew Lunn 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 In-Reply-To: <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> <20160417153541.GC907@lunn.ch> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) Date: Sun, 17 Apr 2016 12:37:54 -0400 Message-ID: <87k2jwmbrx.fsf@ketchup.mtl.sfl> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 576 Lines: 26 Hi Andrew, Andrew Lunn writes: >> @@ -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 *. OK. Thanks, Vivien