Netdev Archive on lore.kernel.org help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu> To: Geoff Levand <geoff@infradead.org>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org> Cc: netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v4 06/10] net/ps3_gelic: Cleanup debug code Date: Thu, 5 Aug 2021 07:08:35 +0200 [thread overview] Message-ID: <4b004fab-bf60-3e77-54f0-f2598ef81396@csgroup.eu> (raw) In-Reply-To: <8421aa2c148d840b11b7115208e5276017999c2a.1627068552.git.geoff@infradead.org> Le 23/07/2021 à 22:31, Geoff Levand a écrit : > In an effort to make the PS3 gelic driver easier to maintain, change the > gelic_card_enable_rxdmac routine to use the optimizer to remove > debug code. > > Signed-off-by: Geoff Levand <geoff@infradead.org> WARNING:VSPRINTF_SPECIFIER_PX: Using vsprintf specifier '%px' potentially exposes the kernel memory layout, if you don't really need the address please consider using '%p'. #38: FILE: drivers/net/ethernet/toshiba/ps3_gelic_net.c:171: + dev_err(dev, "%s:%d: head=%px\n", __func__, __LINE__, + card->rx_chain.head); NOTE: For some of the reported defects, checkpatch may be able to mechanically convert to the typical style using --fix or --fix-inplace. Commit 65f38d9720ac ("net/ps3_gelic: Cleanup debug code") has style problems, please review. NOTE: Ignored message types: ARCH_INCLUDE_LINUX BIT_MACRO COMPARISON_TO_NULL DT_SPLIT_BINDING_PATCH EMAIL_SUBJECT FILE_PATH_CHANGES GLOBAL_INITIALISERS LINE_SPACING MULTIPLE_ASSIGNMENTS > --- > drivers/net/ethernet/toshiba/ps3_gelic_net.c | 19 +++++++++---------- > 1 file changed, 9 insertions(+), 10 deletions(-) > > diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.c b/drivers/net/ethernet/toshiba/ps3_gelic_net.c > index 54e50ad9e629..85fc1915c8be 100644 > --- a/drivers/net/ethernet/toshiba/ps3_gelic_net.c > +++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.c > @@ -162,17 +162,16 @@ static void gelic_card_enable_rxdmac(struct gelic_card *card) > struct device *dev = ctodev(card); > int status; > > -#ifdef DEBUG > - if (gelic_descr_get_status(card->rx_chain.head) != > - GELIC_DESCR_DMA_CARDOWNED) { > - printk(KERN_ERR "%s: status=%x\n", __func__, > - be32_to_cpu(card->rx_chain.head->dmac_cmd_status)); > - printk(KERN_ERR "%s: nextphy=%x\n", __func__, > - be32_to_cpu(card->rx_chain.head->hw_regs.next_descr_addr)); > - printk(KERN_ERR "%s: head=%p\n", __func__, > - card->rx_chain.head); > + if (__is_defined(DEBUG) && (gelic_descr_get_status(card->rx_chain.head) > + != GELIC_DESCR_DMA_CARDOWNED)) { > + dev_err(dev, "%s:%d: status=%x\n", __func__, __LINE__, > + be32_to_cpu(card->rx_chain.head->hw_regs.dmac_cmd_status)); > + dev_err(dev, "%s:%d: nextphy=%x\n", __func__, __LINE__, > + be32_to_cpu(card->rx_chain.head->hw_regs.next_descr_addr)); > + dev_err(dev, "%s:%d: head=%px\n", __func__, __LINE__, > + card->rx_chain.head); > } > -#endif > + > status = lv1_net_start_rx_dma(bus_id(card), dev_id(card), > card->rx_chain.head->link.cpu_addr, 0); > >
next prev parent reply other threads:[~2021-08-05 5:20 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <cover.1627068552.git.geoff@infradead.org> [not found] ` <56efff53fcf563a1741904ea0f078d50c378b6cc.1627068552.git.geoff@infradead.org> 2021-07-24 15:44 ` [PATCH v4 03/10] net/ps3_gelic: Format cleanups Christophe Leroy 2021-08-05 5:06 ` Christophe Leroy [not found] ` <26f56a1c8332d227156cd33586b176a329570117.1627068552.git.geoff@infradead.org> 2021-07-24 15:51 ` [PATCH v4 02/10] net/ps3_gelic: Use local dev variable Christophe Leroy 2021-08-05 5:05 ` Christophe Leroy [not found] ` <c95aa8e57aca8b3af6893f13f2e03731f8198184.1627068552.git.geoff@infradead.org> 2021-08-05 5:03 ` [PATCH v4 01/10] net/ps3_gelic: Add gelic_descr structures Christophe Leroy [not found] ` <bc659850d4eec3b2358c1ccb0e00952ceaa6012f.1627068552.git.geoff@infradead.org> 2021-07-25 18:20 ` [PATCH v4 04/10] net/ps3_gelic: Add new macro BUG_ON_DEBUG Christophe Leroy 2021-08-05 5:07 ` Christophe Leroy [not found] ` <1cdd7f718dde93dcaebf7ddd025869901aa30523.1627068552.git.geoff@infradead.org> 2021-08-05 5:07 ` [PATCH v4 05/10] net/ps3_gelic: Add vlan_id structure Christophe Leroy [not found] ` <8421aa2c148d840b11b7115208e5276017999c2a.1627068552.git.geoff@infradead.org> 2021-08-05 5:08 ` Christophe Leroy [this message] [not found] ` <024b88e07095f00bc2eabfae2f526851600ee272.1627068552.git.geoff@infradead.org> 2021-08-05 5:09 ` [PATCH v4 07/10] net/ps3_gelic: Add new routine gelic_unmap_link Christophe Leroy [not found] ` <07e42ec30037d514c1d63f33efe4642364d89802.1627068552.git.geoff@infradead.org> 2021-07-25 18:27 ` [PATCH v4 08/10] net/ps3_gelic: Rename no to descr_count Christophe Leroy 2021-08-05 5:09 ` Christophe Leroy [not found] ` <5634f7c76a67345c9735e05b68228ea899a8bf9d.1627068552.git.geoff@infradead.org> 2021-07-25 18:29 ` [PATCH v4 09/10] net/ps3_gelic: Add new routine gelic_work_to_card Christophe Leroy 2021-08-05 5:10 ` Christophe Leroy [not found] ` <7aa1d9b1b4ffadcbdc6f88e4f8d4a323da307595.1627068552.git.geoff@infradead.org> 2021-07-25 18:38 ` [PATCH v4 10/10] net/ps3_gelic: Fix DMA mapping problems Christophe Leroy 2021-08-05 5:10 ` Christophe Leroy
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=4b004fab-bf60-3e77-54f0-f2598ef81396@csgroup.eu \ --to=christophe.leroy@csgroup.eu \ --cc=davem@davemloft.net \ --cc=geoff@infradead.org \ --cc=kuba@kernel.org \ --cc=linuxppc-dev@lists.ozlabs.org \ --cc=netdev@vger.kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).