From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Takahashi Akari <akaritakahashioss@gmail.com>,
linux-kernel@vger.kernel.org, Networking <netdev@vger.kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Haoyue Xu" <xuhaoyue1@hisilicon.com>,
"Guofeng Yue" <yueguofeng@hisilicon.com>,
"Geoff Levand" <geoff@infradead.org>,
"Krzysztof Hałasa" <khalasa@piap.pl>,
"Wolfram Sang" <wsa+renesas@sang-engineering.com>
Subject: Re: [PATCH] <driver/net/ethernet/amd/nmclan_cs.c> Remove unnecessary line
Date: Sat, 10 Dec 2022 20:18:52 +0700 [thread overview]
Message-ID: <Y5SHPK0t821eX9Bw@debian.me> (raw)
In-Reply-To: <20221210084713.51710-1-akaritakahashioss@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2801 bytes --]
On Sat, Dec 10, 2022 at 05:47:13PM +0900, Takahashi Akari wrote:
> Hello:
>
> I sent a patch. Please review and merge.
>
> Reason:
> Remove unnecessaty line. (if statement is always true)
>
> Git repository URL:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>
> File:
> drivers/net/ethernet/amd/nmclan_cs.c : 931
>
Hi and welcome to LKML!
Based on your patch, here are my notes:
* Write the patch description in imperative mood (e.g. it should have
been "Remove redundant inner tx_irq_disabled conditional in
mace_interrupt() since it has already been handled". Wrap it in about
72-75 column wide (to account indentation in git-log(1) so that the
total line length is at maximum 80).
* Write also short but concise patch subject (one-line summary), while also
paying attention to the subject prefix. In this
case, it should have been "net: amd: remove inner tx_irq_disabled
conditional".
* Your patch looks like corrupted (tabs converted to spaces, linewrapped,
etc.). Please configure your email-client not to do such things, or better
yet, use git-send-email(1) to send patches.
* You need to Cc: relevant maintainers and lists, which can be obtained
by `scripts/get_maintainer.pl -norolestats -separator , --
/path/to/your/patch`. Personally I put lists in To: header and individual
addresses in Cc:. I have added them for you.
* Last but not least, build the kernel with your patch applied (preferably
enable W=1 and CONFIG_WERROR and also cross-compile).
See also tips from one of kernel subsystem maintainer at [1].
> Signed-off-by: Takahashi Akari <akaritakahashioss@gmail.com>
> ---
> drivers/net/ethernet/amd/nmclan_cs.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/amd/nmclan_cs.c b/drivers/net/ethernet/amd/nmclan_cs.c
> index 823a329a921f..a90e0c5b603d 100644
> --- a/drivers/net/ethernet/amd/nmclan_cs.c
> +++ b/drivers/net/ethernet/amd/nmclan_cs.c
> @@ -928,10 +928,7 @@ static irqreturn_t mace_interrupt(int irq, void *dev_id)
>
> if (lp->tx_irq_disabled) {
> const char *msg;
> - if (lp->tx_irq_disabled)
> - msg = "Interrupt with tx_irq_disabled";
> - else
> - msg = "Re-entering the interrupt handler";
> + msg = "Interrupt with tx_irq_disabled";
> netdev_notice(dev, "%s [isr=%02X, imr=%02X]\n",
> msg,
> inb(ioaddr + AM2150_MACE_BASE + MACE_IR),
Dunno if you need to also handle the else case (that gives "Re-entering" msg)
in the outer conditional.
Thanks.
[1]: https://lore.kernel.org/all/20171026223701.GA25649@bhelgaas-glaptop.roam.corp.google.com/
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2022-12-10 13:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 8:47 [PATCH] <driver/net/ethernet/amd/nmclan_cs.c> Remove unnecessary line Takahashi Akari
2022-12-10 13:18 ` Bagas Sanjaya [this message]
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=Y5SHPK0t821eX9Bw@debian.me \
--to=bagasdotme@gmail.com \
--cc=akaritakahashioss@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geoff@infradead.org \
--cc=khalasa@piap.pl \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=xuhaoyue1@hisilicon.com \
--cc=yueguofeng@hisilicon.com \
/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: link
Be 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