From patchwork Thu Aug 15 05:55:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishka Dasgupta X-Patchwork-Id: 11095083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4889B13B1 for ; Thu, 15 Aug 2019 05:56:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C055285F2 for ; Thu, 15 Aug 2019 05:56:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1DB8A286EE; Thu, 15 Aug 2019 05:56:56 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00ACB285F2 for ; Thu, 15 Aug 2019 05:56:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zQR+ggzooRocMOn3ol+R791z3HX3yp2aKe1TC4ElPpk=; b=n7hEoi2KtYj9BT vwZb8/9F6UCRWMKosSaOHCJI+Q6+iZrFlcQotJVrihcan8T+/qNDPpJellj2ttpUv3L6UHDWC/Yr1 vgEWzq0EWexLTyUscGZLlH1P459iE8yPUYISLemk4eS5Uhx3LjyNmFcRjCyk5Tpoelmo2ZF5lP0ii Xah9ffZAsvuc/52vz2JiQTKtIZORAP9wJJfNRrYpTInHdOO4Zi/VFnYCtuEcDcfttDHJe4jBjkm8e nmIPyZ6N4oZikepDRBmtmLZLLPgO9qmhWM1ZnMi1d7U38TNADBmhaJgH2l4jsEb2+YNDRBXRJdkfL Qzs5uqyKUigWwsXxiHSQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hy8kn-0003Df-80; Thu, 15 Aug 2019 05:56:53 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hy8kj-0003DK-JF for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2019 05:56:51 +0000 Received: by mail-pf1-x442.google.com with SMTP id q139so816325pfc.13 for ; Wed, 14 Aug 2019 22:56:47 -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:mime-version :content-transfer-encoding; bh=LMv7g9wXHCdpQzNDiezF7Zu3048t1TvKSMzmUt6Iaec=; b=Nbj7aAtSyq19UJsmQuc+Ex4Pi5NOVB8mnqUFmpwEm8eZ9pi5djFr4/bEE0w3WfaL9K hQ9uhKoXOKr60c2HjGyZ0ktcoCzT2DygcUJDSTnRqWY94Ksa+BCCDO1Y920mHFJG1I6z J4nY9X4tI1NiH7Qv8Ss6hsDPuOePW26QTHz3AImMkYQVWda0x25iA+i8X5mzbjQ16SxD fhAKhqB7/xzpY2Zscpmb/kHU4bp59TXVFfNwFpjGAUqwHofeYomV5KLaxr3BFn3K1FS2 aRFUmpZ6cK10pm+Ee3ddQLK5Uv7IPd2AYTWEkYzwIZpW2HRYtEgS70wk6XedQCWDBbB5 uIrg== 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:mime-version :content-transfer-encoding; bh=LMv7g9wXHCdpQzNDiezF7Zu3048t1TvKSMzmUt6Iaec=; b=HefvcH9byIijPvULMCjf2EXgIJlM0D+5Kc5WGBtDx5IVAsLcCVwdsanuzZfkPOkC2u IVhpumDF/in/7Ty9pKx/EIbaQpkRz/4Hhym2b/C8VnGXY6dTU872gRMgJaNpi0ZPaH9C hy/okWRR/kUZzZH/c6RcPiUZGkseSW0o5fpFn+p37zdKzwsRMpa+MvfwJLW49yzblJZF hwrY1k5DhvnZJQpB4nSxNS4ODLNl9/7tOLSmvRbJuPYy1n5++zCdeQ/A8Tvp2qNBFLmh kxu2YKyiznFotRIOR0F80HqzFeR1gE4E/S8bex4ve4r01XSTsHWZjF5Oo0Rn80CqauGm lecQ== X-Gm-Message-State: APjAAAU2VTkzo92VfG2bguDa+6tC2azy9pCijkV5Obi8F4BmO5Mjkv+S czDBK8RucQZd5dwNKBvFidI= X-Google-Smtp-Source: APXvYqzsBrzf5Xl1V4jlpLHO/SSF96Xl57QdQQXXo5hn6qm18ElxdHDbhvSpVTol70QI702+E6r+FA== X-Received: by 2002:a17:90a:9b08:: with SMTP id f8mr771793pjp.103.1565848607504; Wed, 14 Aug 2019 22:56:47 -0700 (PDT) Received: from localhost.localdomain ([110.225.3.176]) by smtp.gmail.com with ESMTPSA id 185sm2225057pff.54.2019.08.14.22.56.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 22:56:47 -0700 (PDT) From: Nishka Dasgupta To: rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] i2c: iproc: Make bcm_iproc_i2c_quirks constant Date: Thu, 15 Aug 2019 11:25:50 +0530 Message-Id: <20190815055550.1588-1-nishkadg.linux@gmail.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190814_225649_638396_6CEAE225 X-CRM114-Status: GOOD ( 10.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nishka Dasgupta Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Static structure bcm_iproc_i2c_quirks, of type i2c_adapter_quirks, is only used when being assigned to constant field quirks of a variable having type i2c_adapter. Hence make bcm_iproc_i2c_quirks constant as well to prevent it from unintended modification. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta Reviewed-by: Ray Jui --- drivers/i2c/busses/i2c-bcm-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index d7fd76baec92..e9f0e5b6eadc 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -805,7 +805,7 @@ static struct i2c_algorithm bcm_iproc_algo = { .unreg_slave = bcm_iproc_i2c_unreg_slave, }; -static struct i2c_adapter_quirks bcm_iproc_i2c_quirks = { +static const struct i2c_adapter_quirks bcm_iproc_i2c_quirks = { .max_read_len = M_RX_MAX_READ_LEN, };