public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: cjz <guagua210311@qq.com>
Cc: linux-gpio@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, Grygorii.Strashko@ti.com,
	ssantosh@kernel.org, khilman@kernel.org,
	linus.walleij@linaro.org, brgl@kernel.org
Subject: Re: [PATCH] gpio: omap: add kernel-doc comment for omap_gpio_get()
Date: Mon, 1 Dec 2025 11:46:02 +0100	[thread overview]
Message-ID: <20251201114602.094dce74@kemnade.info> (raw)
In-Reply-To: <tencent_BB49A52B7796EBAFEC293B0B5203602BD608@qq.com>

Hi,

On Mon,  1 Dec 2025 17:54:21 +0800
cjz <guagua210311@qq.com> wrote:

> From: changjunzheng <guagua210311@qq.com>
> 
> omap_gpio_get() is a core function for reading OMAP GPIO pin level, but it lacks complete kernel-doc comment (no function description, parameter explanation, or return value说明). This causes gcc W=1 warning and reduces code readability.
> 
> Add standard kernel-doc comment to fix the warning and improve maintainability.
> 
Can you elaborate on how this improves maintainability to document
obvious parameters of a local function? And why for this local function and
not for others? So why omap_gpio_runtime_suspend() which is also used
as function pointer does not need such comments?
 
Citing coding-style.rst:
"Do not add boilerplate
kernel-doc which simply reiterates what's obvious from the signature
of the function."

If that is just about compliance to some rule or make a compiler happy
in W=1, than do not disguise that and add fake arguments for your change.

BTW:  
andi@akm1:~/linux$ touch drivers/gpio/gpio-omap.c 
andi@akm1:~/linux$ make LLVM=1 ARCH=arm W=1
  CALL    scripts/checksyscalls.sh
  CC      drivers/gpio/gpio-omap.o
  AR      drivers/gpio/built-in.a
  AR      drivers/built-in.a

Silence....
with gcc again:
andi@akm1:~/linux$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs W=1
  CALL    scripts/checksyscalls.sh
  CC      drivers/gpio/gpio-omap.o
  AR      drivers/gpio/built-in.a
  AR      drivers/built-in.a
  AR      built-in.a
  AR      vmlinux.a
  LD      vmlinux.o

Also silence.

Regards,
Andreas

      reply	other threads:[~2025-12-01 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-01  9:54 [PATCH] gpio: omap: add kernel-doc comment for omap_gpio_get() cjz
2025-12-01 10:46 ` Andreas Kemnade [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=20251201114602.094dce74@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=Grygorii.Strashko@ti.com \
    --cc=brgl@kernel.org \
    --cc=guagua210311@qq.com \
    --cc=khilman@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ssantosh@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: 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