lists.openwall.net   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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1419134735.27324.41.camel@neuling.org>
Date:	Sun, 21 Dec 2014 15:05:35 +1100
From:	Michael Neuling <mikey@...ling.org>
To:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
Cc:	Ian Munsie <imunsie@....ibm.com>, linuxppc-dev@...ts.ozlabs.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc: cxl: sysfs.c:  Remove unused function

> Remove the function mmio_size_show() that is not used anywhere.

Did you compile check this patch?

  drivers/misc/cxl/sysfs.c:291:74: error: ‘mmio_size_show’ undeclared here (not in a function)

It's used here:
        static struct device_attribute afu_attrs[] = {
        	__ATTR_RO(mmio_size),

> This was partially found by using a static code analysis program called cppcheck.

Thanks for letting me know which tool to avoid :-)

Mikey


> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
> ---
>  drivers/misc/cxl/sysfs.c |   11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c
> index ce7ec06..0431ec3 100644
> --- a/drivers/misc/cxl/sysfs.c
> +++ b/drivers/misc/cxl/sysfs.c
> @@ -102,17 +102,6 @@ static struct device_attribute afu_master_attrs[] = {
>  
>  /*********  AFU attributes  **************************************************/
>  
> -static ssize_t mmio_size_show(struct device *device,
> -			      struct device_attribute *attr,
> -			      char *buf)
> -{
> -	struct cxl_afu *afu = to_cxl_afu(device);
> -
> -	if (afu->pp_size)
> -		return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->pp_size);
> -	return scnprintf(buf, PAGE_SIZE, "%llu\n", afu->adapter->ps_size);
> -}
> -
>  static ssize_t reset_store_afu(struct device *device,
>  			       struct device_attribute *attr,
>  			       const char *buf, size_t count)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ