From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967525AbcHBRId (ORCPT ); Tue, 2 Aug 2016 13:08:33 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:47954 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935573AbcHBRIU (ORCPT ); Tue, 2 Aug 2016 13:08:20 -0400 X-IBM-Helo: d06dlp03.portsmouth.uk.ibm.com X-IBM-MailFrom: borntraeger@de.ibm.com X-IBM-RcptTo: kvm@vger.kernel.org;linux-kernel@vger.kernel.org;linux-s390@vger.kernel.org Subject: Re: [PATCH 0904/1285] Replace numeric parameter like 0444 with macro To: Baole Ni , cornelia.huck@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, dwmw2@infradead.org, m.chehab@samsung.com, pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, k.kozlowski@samsung.com References: <20160802115646.10237-1-baolex.ni@intel.com> Cc: linux-s390@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, chuansheng.liu@intel.com From: Christian Borntraeger Date: Tue, 2 Aug 2016 16:05:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: <20160802115646.10237-1-baolex.ni@intel.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16080214-0040-0000-0000-000002B8F82B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16080214-0041-0000-0000-00001C7407EB Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-08-02_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1608020144 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In general, I find sending 1285 patches to lkml unfriendly without doing a precheck if the general idea is good. This is especially true as you did NOT provide a cover letter that would allow to hide this thread on lkml. Regarding this particular patch, I do not really like this change, as I find "0444" much easier to parse than "S_IRUSR | S_IRGRP | S_IROTH" Christian On 08/02/2016 01:56 PM, 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 > Signed-off-by: Baole Ni > --- > drivers/s390/virtio/virtio_ccw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/s390/virtio/virtio_ccw.c b/drivers/s390/virtio/virtio_ccw.c > index 8688ad4..56d3671 100644 > --- a/drivers/s390/virtio/virtio_ccw.c > +++ b/drivers/s390/virtio/virtio_ccw.c > @@ -1074,7 +1074,7 @@ static unsigned long devs_no_auto[__MAX_SSID + 1][__DEV_WORDS]; > > static char *no_auto = ""; > > -module_param(no_auto, charp, 0444); > +module_param(no_auto, charp, S_IRUSR | S_IRGRP | S_IROTH); > MODULE_PARM_DESC(no_auto, "list of ccw bus id ranges not to be auto-onlined"); > > static int virtio_ccw_check_autoonline(struct ccw_device *cdev) >