Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932296AbdHWQqI (ORCPT ); Wed, 23 Aug 2017 12:46:08 -0400 Received: from mail-qk0-f194.google.com ([209.85.220.194]:35576 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbdHWQqG (ORCPT ); Wed, 23 Aug 2017 12:46:06 -0400 Subject: Re: [PATCH v3] net: stmmac: Delete dead code for MDIO registration To: Romain Perier , Giuseppe Cavallaro , Alexandre Torgue , Andrew Lunn Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20170823085058.23333-1-romain.perier@collabora.com> From: Florian Fainelli Message-ID: Date: Wed, 23 Aug 2017 09:46:02 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170823085058.23333-1-romain.perier@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 60 On 08/23/2017 01:50 AM, Romain Perier wrote: > This code is no longer used, the logging function was changed by commit > fbca164776e4 ("net: stmmac: Use the right logging functi"). It was > previously showing information about the type if the IRQ, if it's polled, > ignored or a normal interrupt. As we don't want information loss, I have > moved this code to phy_attached_print(). > > Fixes: fbca164776e4 ("net: stmmac: Use the right logging functi") For future submissions, do not truncate the commit subject that you are referencing. > Signed-off-by: Romain Perier Since this is a fix you should indicate in the patch subject that this is targeting David's "net" tree, see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/netdev-FAQ.txt#n85 > const char *drv_name = phydev->drv ? phydev->drv->name : "unbound"; > + char *irq_str; > + char irq_num[4]; > + > + switch(phydev->irq) { > + case PHY_POLL: > + irq_str = "POLL"; > + break; > + case PHY_IGNORE_INTERRUPT: > + irq_str = "IGNORE"; > + break; > + default: > + snprintf(irq_num, sizeof(irq_str), "%d", phydev->irq); sizeof(irq_str) = 4 or 8 depending on the architecture because it's a pointer, did not you mean sizeof(irq_num) here instead? > + irq_str = irq_num; > + break; > + } > > if (!fmt) { > dev_info(&phydev->mdio.dev, ATTACHED_FMT "\n", > drv_name, phydev_name(phydev), > - phydev->irq); > + irq_str); > } else { > va_list ap; > > dev_info(&phydev->mdio.dev, ATTACHED_FMT, > drv_name, phydev_name(phydev), > - phydev->irq); > + irq_str); > > va_start(ap, fmt); > vprintk(fmt, ap); > -- Florian