lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 6 Apr 2019 12:32:53 -0700
From:   Guenter Roeck <>
To:     Hariprasad Kelam <>,
        Wim Van Sebroeck <>,,
Subject: Re: [PATCH] watchdog: machzwd : fix warning Using plain integer as
 NULL pointer

On 4/6/19 6:14 AM, Hariprasad Kelam wrote:
> Changes passing function argument 0 to NULL to avoid below sparse
> warning
>   CHECK   drivers/watchdog//machzwd.c
> drivers/watchdog//machzwd.c:321:25: warning: Using plain integer as NULL
> pointer
> Signed-off-by: Hariprasad Kelam <>


Reviewed-by: Guenter Roeck <>

If anyone is still using the HW supported by this driver, it would
be a prime target for conversion to use the watchdog subsystem.
This would reduce code size and improve driver stability.
_That_ would be useful.

The only reason for replacing 0 with NULL is to make a static checker
happy. This kind of change adds zero value to the code. Instead, it
takes time from those who have to review the patches and apply them.

If we ignore such patches, we'll get them again and again, taking
away even more time. If we don't ignore them, we encourage submitters
and get even more useless patches. If we try to discourage them, we
risk being accused of being unfriendly. This is a perfect lose-lose
situation for maintainers.


> ---
>   drivers/watchdog/machzwd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
> index 88d823d..c3926d0 100644
> --- a/drivers/watchdog/machzwd.c
> +++ b/drivers/watchdog/machzwd.c
> @@ -318,7 +318,7 @@ static long zf_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
>   		return put_user(0, p);
> -		zf_ping(0);
> +		zf_ping(NULL);
>   		break;
>   	default:
>   		return -ENOTTY;

Powered by blists - more mailing lists