netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Kriish Sharma <kriish.sharma2006@gmail.com>
Cc: khc@pm.waw.pl, andrew+netdev@lunn.ch, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drivers/net/wan/hdlc_ppp: fix potential null pointer in ppp_cp_event logging
Date: Fri, 3 Oct 2025 09:33:12 +0100	[thread overview]
Message-ID: <20251003083312.GC2878334@horms.kernel.org> (raw)
In-Reply-To: <20251002180541.1375151-1-kriish.sharma2006@gmail.com>

On Thu, Oct 02, 2025 at 06:05:41PM +0000, Kriish Sharma wrote:
> Fixes warnings observed during compilation with -Wformat-overflow:
> 
> drivers/net/wan/hdlc_ppp.c: In function ‘ppp_cp_event’:
> drivers/net/wan/hdlc_ppp.c:353:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
>   353 |                 netdev_info(dev, "%s down\n", proto_name(pid));
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/net/wan/hdlc_ppp.c:342:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
>   342 |                 netdev_info(dev, "%s up\n", proto_name(pid));
>       |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Introduce local variable `pname` and fallback to "unknown" if proto_name(pid)
> returns NULL.
> 
> Fixes: 262858079afd ("Add linux-next specific files for 20250926")
> Signed-off-by: Kriish Sharma <kriish.sharma2006@gmail.com>

Hi Kriish,

As it looks like there will be another revision of this patch,
I have a few minor points on process for your consideration.

As a fix for Networking code present in the net tree this should probably
be targeted at the net tree. That means it should apply cleanly to that
tree (I assume it does). And the target tree should be denoted in the
subject.  Like this:

Subject: [PATCh net] ...

This is as opposed to non-fix patches which, generally, are targeted
at the net-nex tree.

Specifying the target tree helps land patches in the right place
for CI. And helps the maintainers too.

Also, git history isn't consistent here, but I would suggest
that a more succinct prefix is appropriate for this patch.
Perhaps 'hdlc_ppp:'

I.e.: Subject: [PATCH net] hdlc_ppp: ...

For more in process for networking patches please see:
https://docs.kernel.org/process/maintainer-netdev.html

Thanks!

...

  parent reply	other threads:[~2025-10-03  8:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 18:05 [PATCH] drivers/net/wan/hdlc_ppp: fix potential null pointer in ppp_cp_event logging Kriish Sharma
2025-10-02 18:16 ` Dimitri Daskalakis
2025-10-02 18:31   ` Kriish Sharma
2025-10-03  6:34 ` Krzysztof Hałasa
2025-10-03  6:43   ` Kriish Sharma
2025-10-07  8:41     ` Paolo Abeni
2025-10-07  9:28       ` Krzysztof Hałasa
2025-10-07 10:46         ` Paolo Abeni
2025-10-07 11:38           ` Krzysztof Hałasa
2025-10-03  8:33 ` Simon Horman [this message]
2025-10-03  9:02   ` Kriish Sharma
2025-10-03  9:40     ` Simon Horman

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=20251003083312.GC2878334@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=khc@pm.waw.pl \
    --cc=kriish.sharma2006@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).