2019-09-02 12:40:11

by Robert Richter

[permalink] [raw]
Subject: [PATCH 2/5] EDAC, mc_sysfs: Change dev_ch_attribute->channel to unsigned int

Struct member dev_ch_attribute->channel is always used as unsigned
int. Change type to unsigned int to avoid type casts.

Signed-off-by: Robert Richter <[email protected]>
---
drivers/edac/edac_mc_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 640b9419623e..4eb8c5ceb973 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -131,7 +131,7 @@ static const char * const edac_caps[] = {

struct dev_ch_attribute {
struct device_attribute attr;
- int channel;
+ unsigned int channel;
};

#define DEVICE_CHANNEL(_name, _mode, _show, _store, _var) \
--
2.20.1


2019-09-02 13:09:12

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 2/5] EDAC, mc_sysfs: Change dev_ch_attribute->channel to unsigned int

On Mon, Sep 02, 2019 at 12:33:43PM +0000, Robert Richter wrote:
> Struct member dev_ch_attribute->channel is always used as unsigned
> int. Change type to unsigned int to avoid type casts.
>
> Signed-off-by: Robert Richter <[email protected]>
> ---
> drivers/edac/edac_mc_sysfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
> index 640b9419623e..4eb8c5ceb973 100644
> --- a/drivers/edac/edac_mc_sysfs.c
> +++ b/drivers/edac/edac_mc_sysfs.c
> @@ -131,7 +131,7 @@ static const char * const edac_caps[] = {
>
> struct dev_ch_attribute {
> struct device_attribute attr;
> - int channel;
> + unsigned int channel;
> };
>
> #define DEVICE_CHANNEL(_name, _mode, _show, _store, _var) \
> --

Merged this one into 1/5.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.