Re: [PATCH 0875/1285] Replace numeric parameter like 0444 with macro

From: Heiko Carstens
Date: Tue Aug 02 2016 - 13:44:47 EST


On Tue, Aug 02, 2016 at 07:54:12PM +0800, Baole Ni wrote:
> I find that the developers often just specified the numeric value
> when calling a macro which is defined with a parameter for access permission.
> As we know, these numeric value for access permission have had the corresponding macro,
> and that using macro can improve the robustness and readability of the code,
> thus, I suggest replacing the numeric parameter with the macro.
>
> Signed-off-by: Chuansheng Liu <chuansheng.liu@xxxxxxxxx>
> Signed-off-by: Baole Ni <baolex.ni@xxxxxxxxx>
> ---
> drivers/s390/block/dasd_devmap.c | 38 +++++++++++++++++++-------------------
> 1 file changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
> index 3cdbce4..a70a159 100644
> --- a/drivers/s390/block/dasd_devmap.c
> +++ b/drivers/s390/block/dasd_devmap.c
> @@ -747,7 +747,7 @@ static ssize_t dasd_ff_store(struct device *dev, struct device_attribute *attr,
> return count;
> }
>
> -static DEVICE_ATTR(failfast, 0644, dasd_ff_show, dasd_ff_store);
> +static DEVICE_ATTR(failfast, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, dasd_ff_show, dasd_ff_store);

Please consider all patches NACK'ed that touch s390 code, for the same
reasons that have been outlined by several other people.