netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Thorsten Blum <thorsten.blum@linux.dev>,
	"David S. Miller" <davem@davemloft.net>,
	David Ahern <dsahern@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: ipconfig: Remove outdated comment and indent code block
Date: Mon, 22 Dec 2025 12:42:48 +0100	[thread overview]
Message-ID: <e3f77ae4-e612-4926-bd13-4fe174079768@redhat.com> (raw)
In-Reply-To: <20251220130335.77220-1-thorsten.blum@linux.dev>



On 12/20/25 2:03 PM, Thorsten Blum wrote:
> The comment has been around ever since commit 1da177e4c3f4
> ("Linux-2.6.12-rc2") and can be removed. Remove it and indent the code
> block accordingly.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  net/ipv4/ipconfig.c | 87 ++++++++++++++++++++++-----------------------
>  1 file changed, 42 insertions(+), 45 deletions(-)
> 
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index 019408d3ca2c..d577ef580f8c 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -705,51 +705,48 @@ ic_dhcp_init_options(u8 *options, struct ic_device *d)
>  		e += 4;
>  	}
>  
> -	/* always? */
> -	{
> -		static const u8 ic_req_params[] = {
> -			1,	/* Subnet mask */
> -			3,	/* Default gateway */
> -			6,	/* DNS server */
> -			12,	/* Host name */
> -			15,	/* Domain name */
> -			17,	/* Boot path */
> -			26,	/* MTU */
> -			40,	/* NIS domain name */
> -			42,	/* NTP servers */
> -		};
> -
> -		*e++ = 55;	/* Parameter request list */
> -		*e++ = sizeof(ic_req_params);
> -		memcpy(e, ic_req_params, sizeof(ic_req_params));
> -		e += sizeof(ic_req_params);
> -
> -		if (ic_host_name_set) {
> -			*e++ = 12;	/* host-name */
> -			len = strlen(utsname()->nodename);
> -			*e++ = len;
> -			memcpy(e, utsname()->nodename, len);
> -			e += len;
> -		}
> -		if (*vendor_class_identifier) {
> -			pr_info("DHCP: sending class identifier \"%s\"\n",
> -				vendor_class_identifier);
> -			*e++ = 60;	/* Class-identifier */
> -			len = strlen(vendor_class_identifier);
> -			*e++ = len;
> -			memcpy(e, vendor_class_identifier, len);
> -			e += len;
> -		}
> -		len = strlen(dhcp_client_identifier + 1);
> -		/* the minimum length of identifier is 2, include 1 byte type,
> -		 * and can not be larger than the length of options
> -		 */
> -		if (len >= 1 && len < 312 - (e - options) - 1) {
> -			*e++ = 61;
> -			*e++ = len + 1;
> -			memcpy(e, dhcp_client_identifier, len + 1);
> -			e += len + 1;
> -		}
> +	static const u8 ic_req_params[] = {
> +		1,	/* Subnet mask */
> +		3,	/* Default gateway */
> +		6,	/* DNS server */
> +		12,	/* Host name */
> +		15,	/* Domain name */
> +		17,	/* Boot path */
> +		26,	/* MTU */
> +		40,	/* NIS domain name */
> +		42,	/* NTP servers */
> +	};

I think you additionally need to move the const definition at function
start. Besides...

## Form letter - net-next-closed

The net-next tree is closed for new drivers, features, code refactoring
and optimizations due to the merge window and the winter break. We are
currently accepting bug fixes only.

Please repost when net-next reopens after Jan 2nd.

RFC patches sent for review only are obviously welcome at any time.


      reply	other threads:[~2025-12-22 11:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-20 13:03 [PATCH net-next] net: ipconfig: Remove outdated comment and indent code block Thorsten Blum
2025-12-22 11:42 ` Paolo Abeni [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=e3f77ae4-e612-4926-bd13-4fe174079768@redhat.com \
    --to=pabeni@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thorsten.blum@linux.dev \
    /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).