From patchwork Fri Sep 21 13:40:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 147273 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp837808ljw; Fri, 21 Sep 2018 06:41:16 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaotWCLyWrNiTUBEFlT6jhGhNMnLWP2Y2IzvxE3GhGUyZSz8y+Lyclxah0DSEaWNf7Xt+dr X-Received: by 2002:a62:3c7:: with SMTP id 190-v6mr46127973pfd.145.1537537276715; Fri, 21 Sep 2018 06:41:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537537276; cv=none; d=google.com; s=arc-20160816; b=qI/cI6nMlbnn+FBRsl5ndh4EhnNd2Bx6c+ZSRu4RVaGQBCfxUaY9gYY0bu5nvLyj01 BDLMrtxwg0emz6ObxuNTvkn/LUumy9L52ZnHRWswX93Qk4NQPEaOh9djLq8KqGx2gklS ejUvHLl8O8LV7PB5sIWx2rvV9Pkjf9V/pE1N3My79LtnRyFgNm/oYzJ7m3a9NkQnBxwa NX9FSRPpDItnfHkF0bir/HtV5J6Un3+9fvpBDVbCDYeD5H9G93MzrrftJ8dhbPemM/oE NBdgBhhidiIcke6OgV82hVbKeXeILrLeKT78Esa21nl4G+oRUaOtWK6e/y0xEHWGINeo GXDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=H7nLG5v+XSqLrjx8hRfsy4SA1JMyZyl0jYSSKjsVG1s=; b=ZJx6l3SmMbF28RVLGHj+VhsuvkPQs1JMUnx8dfGQJgaXmdhFBhs0SYvUKXncjmuSZ8 +gLEvR5lD/yjYDtjy6VXb8P3Qs9CcwRc1ihKGuRlGgxIAw4SasbVPkGlP5qlWu/G5JVB 1VQJCoTBIBoOYrygkVLlIO6wpzo+L9cKheixtF50OHSobt6sVyb5tb0oVJCsaReWg2A2 6wykWZLP0cO0dNcr96UqVWDWl3tVF25EQzEGvkGNccC6n6IGoRtzSzBj6sxP+XyXKDa1 kwSMJEuS36u+jTFtAx0LtMxNMWBZUydVreKBHmEYurKAlPbJh5tp7m8FcBXveEYJohTw 04sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aj9uvoe0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j3-v6si26087992pld.402.2018.09.21.06.41.16; Fri, 21 Sep 2018 06:41:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Aj9uvoe0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390407AbeIUT36 (ORCPT + 32 others); Fri, 21 Sep 2018 15:29:58 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:37162 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390376AbeIUT35 (ORCPT ); Fri, 21 Sep 2018 15:29:57 -0400 Received: by mail-it1-f196.google.com with SMTP id h20-v6so1932842itf.2 for ; Fri, 21 Sep 2018 06:41:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=H7nLG5v+XSqLrjx8hRfsy4SA1JMyZyl0jYSSKjsVG1s=; b=Aj9uvoe0eLljVycNPUgMl8KfyKKtmTVjl4ncO91AB7s/R59ohfDeKrxHPC8grr6z5l IaxlVFM1EmQkV71zmYHKdXFd5xhmfi2OQWmhRdb7e6ycYAGDVXtGQqfI9cSCqta+BJVg z6BCyBXcGxKzHvJVpFirK41vRs+ob5SvC6h1M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=H7nLG5v+XSqLrjx8hRfsy4SA1JMyZyl0jYSSKjsVG1s=; b=exDQOibIZDqAeO+T8NR6qXxUOvYLhBoXNqpLohPheG9fn1Ca6PVOZqGsrq7aYS5Brl VKgjxEjdc2MwHarqMxFUd3PPAfOE0qGsjOwODTFraJUg1M07UuEpOmq4JCamZ100ADNx yH4PScBJZ8rrgsLugBHgrpG4w+XECreJeGkpoQfcZQWgKQs8sYoP1Tl8AqN6UcGcZm4D aSYQ96VjxyhfltphTgGPAbvvlYakGEzrq+kOETmQNm1qzlzRZBIaMRvHnffHLIa0RumP u5ZGn1NxAzDo9QK9pY5y+d8tFo78zI5+nmawzTBZ1HIvXw7rkohIZW9o2CS0ILOHVwx9 ZASA== X-Gm-Message-State: APzg51CF1AWWMe81Sgbgf278Ff1bqQSxu+0LSH5N2xKFg0t4WkL1EQg7 SgxXhkzcL3QSuwhwNtODdsELjw== X-Received: by 2002:a24:60d:: with SMTP id 13-v6mr5848982itv.1.1537537262087; Fri, 21 Sep 2018 06:41:02 -0700 (PDT) Received: from localhost.localdomain ([209.82.80.116]) by smtp.gmail.com with ESMTPSA id c12-v6sm9896298ioq.81.2018.09.21.06.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Sep 2018 06:41:01 -0700 (PDT) From: srinivas.kandagatla@linaro.org To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Bartosz Golaszewski , Srinivas Kandagatla Subject: [PATCH 24/26] nvmem: use octal permissions instead of constants Date: Fri, 21 Sep 2018 06:40:24 -0700 Message-Id: <20180921134026.4596-25-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20180921134026.4596-1-srinivas.kandagatla@linaro.org> References: <20180921134026.4596-1-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Checkpatch emits a warning when using symbolic permissions. Use octal permissions instead. Signed-off-by: Bartosz Golaszewski Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -- 2.19.0 diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index e44a1860a2b3..ad1227df1984 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -154,7 +154,7 @@ static ssize_t bin_attr_nvmem_write(struct file *filp, struct kobject *kobj, static struct bin_attribute bin_attr_rw_nvmem = { .attr = { .name = "nvmem", - .mode = S_IWUSR | S_IRUGO, + .mode = 0644, }, .read = bin_attr_nvmem_read, .write = bin_attr_nvmem_write, @@ -178,7 +178,7 @@ static const struct attribute_group *nvmem_rw_dev_groups[] = { static struct bin_attribute bin_attr_ro_nvmem = { .attr = { .name = "nvmem", - .mode = S_IRUGO, + .mode = 0444, }, .read = bin_attr_nvmem_read, }; @@ -201,7 +201,7 @@ static const struct attribute_group *nvmem_ro_dev_groups[] = { static struct bin_attribute bin_attr_rw_root_nvmem = { .attr = { .name = "nvmem", - .mode = S_IWUSR | S_IRUSR, + .mode = 0600, }, .read = bin_attr_nvmem_read, .write = bin_attr_nvmem_write, @@ -225,7 +225,7 @@ static const struct attribute_group *nvmem_rw_root_dev_groups[] = { static struct bin_attribute bin_attr_ro_root_nvmem = { .attr = { .name = "nvmem", - .mode = S_IRUSR, + .mode = 0400, }, .read = bin_attr_nvmem_read, };