From patchwork Mon Aug 21 11:43:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9912271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34441602D8 for ; Mon, 21 Aug 2017 11:47:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1933C286E4 for ; Mon, 21 Aug 2017 11:47:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0E3B12875B; Mon, 21 Aug 2017 11:47:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE46A286E4 for ; Mon, 21 Aug 2017 11:47:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753627AbdHULoH (ORCPT ); Mon, 21 Aug 2017 07:44:07 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:38339 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753610AbdHULoC (ORCPT ); Mon, 21 Aug 2017 07:44:02 -0400 Received: by mail-pg0-f68.google.com with SMTP id t3so3088101pgt.5; Mon, 21 Aug 2017 04:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AHUwcJ2YABVWw0o8MR1RIYbKUr5A5wLXuOgAaXjQ1g0=; b=dPxnCyIE6kZ6DKGodRJe/CRx7IJhRHQJGH6qxhbG+m4wEAyYKbP6jiWvOWL6amZsEj Bp9dvhyMKdrLPYmQRaBWd0jc3SUvS1IbtpsdmqdDjAWkRhzz5yDqEPJBifwLsiaarKXY AdiX1L2ZC/Tq2Q1C/2P2oFnP030VYFA8YgJUKGC86AGsGtbrbrO6ZDQRRLUvdO7Em9Ss xxb7qI3i8JFwHQf4AgiaaFYuuPOW0R1zayOSnCeFBjr7Xo43cePbIrcpE7fgyAH4uYOP qBEu7mGQZsCO2ZM/hazPYgQeZDMZFlABLQHroZiqwSrcK7XJ2mQfyOFHOOsZD1h3+iBe eugg== 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=AHUwcJ2YABVWw0o8MR1RIYbKUr5A5wLXuOgAaXjQ1g0=; b=b+5BzxMNksoFO1OCrq5F/FZdOpBmohgp3epVlmAOgE0d2XvyPdtNG7Wam1j3tTPrWI UNWxFcnj00WZmxrJJ3SsJasgFSZsbEPps5t0M5RXv5tT8ZRDDNgJWNmr307voaKAEmOf YSwNX97a8QmwAtEOT+8TnDNmKKqmS0JInNpwaGN1uxEmFWijz4CRDao2y3QD0XYY4ZGY a2SBV63+AMqGOiogO6PsdOmldAFmsVRk0m1qfjmMVqoWRnZ2fzwBGEliGzEUxZrGfNT6 9iVz9WwlsHv5/RI7oJ21u9I2zCId3nE2WqRkuG5BnIXzW+yS4V2u3bMBcpF5GiKj1EmF zqpw== X-Gm-Message-State: AHYfb5i9S2SrqLeL/i2RgAwI+58J8zTwC4BcQ3Jlco/XQSNFRIjzDM5P 1TJJ1k2zYH/PkQ== X-Received: by 10.99.96.198 with SMTP id u189mr11600339pgb.338.1503315841209; Mon, 21 Aug 2017 04:44:01 -0700 (PDT) Received: from gmail.com ([117.196.124.142]) by smtp.gmail.com with ESMTPSA id t5sm23324240pfd.96.2017.08.21.04.43.52 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 04:44:00 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 21 Aug 2017 17:13:49 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org, jbacik@fb.com, jikos@kernel.org, benjamin.tissoires@redhat.com, manish.chopra@cavium.com, rahul.verma@cavium.com, Dept-GELinuxNICDev@cavium.com, harish.patil@cavium.com, cascardo@holoscopio.com, don@syst.com.br, dvhart@infradead.org, andy@infradead.org, sre@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, nbd-general@lists.sourceforge.net, linux-input@vger.kernel.org, netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 2/6] nbd: make device_attribute const Date: Mon, 21 Aug 2017 17:13:08 +0530 Message-Id: <1503315792-14837-3-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> References: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make this const as is is only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal --- drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index 5bdf923..49d7763 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -165,7 +165,7 @@ static ssize_t pid_show(struct device *dev, return sprintf(buf, "%d\n", task_pid_nr(nbd->task_recv)); } -static struct device_attribute pid_attr = { +static const struct device_attribute pid_attr = { .attr = { .name = "pid", .mode = S_IRUGO}, .show = pid_show, };