From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20B21C3A589 for ; Thu, 15 Aug 2019 16:43:17 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2F9120578 for ; Thu, 15 Aug 2019 16:43:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ULKQHNnw"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="CCU74OVL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2F9120578 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pFkm90M9+Y6U+IuHRCB9+VYi1uWKQUSz1IDN4BTfXKs=; b=ULKQHNnwMAaFHbLxi9D3xLniG IOMEibMzwTVTU/sThfJbqnqfhzOJVsu93t0brp/5jr7P+ApEb2iFDOo7uVCKzc4HfZpHEmalwkTmj clBpwX7+ADIRfVcsiwOaLPheMv+obU13zEDiUBCaY4qTZacQJhWm3X17k+fm6tLtheK5AGfLYrcVq AJFPq3FTrrfoAqk6CQoQvQbkq0keK4ZIZkTZvF1fTtKfM0xVPOUOUXWflqcYfa2J2s3tf5kbYWDEh 1cHziY3HxmdnjGrAAHcj9Ed+1w7feZbaevRrVe/tzXF202GmHxBr9/mt9WBse55tbhV5+RIIGzTfh +CAJfvdqg==; 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 1hyIqK-0008Kg-Er; Thu, 15 Aug 2019 16:43:16 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hyIqB-0008GQ-VF for linux-arm-kernel@lists.infradead.org; Thu, 15 Aug 2019 16:43:14 +0000 Received: by mail-pg1-x542.google.com with SMTP id w10so1524196pgj.7 for ; Thu, 15 Aug 2019 09:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=RDP6dCH5SfbePXj50Yif9P0DeSA7UpHTBf1zvPFWOKs=; b=CCU74OVLrLaosPhbhlWUvm/fK344mtCf8+8LUVUjq11XQdbsdrcBpxuBasG+4dcLxk iNOVq5P9Ta2MM1OBqw4OTlhpq9lk9k2P8j4ElxzhsLM9qgcsq7yg45xJTpWr7SwkSIBo B9/XWFBlccxgCvJB3KUE5OUm2YJOK0RlcZKDM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RDP6dCH5SfbePXj50Yif9P0DeSA7UpHTBf1zvPFWOKs=; b=tGHgpvOVZ0HtKYRMOkiWK0/jkUJU/N1Dw8+Ywl9+rNG6X4DeuJQdDqigkoOopGx0n4 qEVWpkaXJ6Q+lWoJZvPJGXewu+Psa/73SNztIcxsuYtkHhRD1VcVZYtRe7oLr8YM5ShX 0Vj96i4+tI/017qlEAujabiWTr8CaRFNxeYPEJiNbgQP0O70at/iiImVjUxzEi4jjDfW QzquVqXNKufkstGzWti0jJ6RTjZLZpZ+MbmmSOoAc1JSfTiX3RObCS0WjTXbxKBWq3mu vJZZ1oGwwB1w7fIjaOfU6Aw9YOxvtawOKLJLyrsZC8h2F2EVRxRnS/hp/Fu5eIMr1z7v l5qQ== X-Gm-Message-State: APjAAAUFzPFsB8r0KaOOOYMOoJs1OfXR+Wgic3ibnv0fzsFZTLn4eZwj JeQhFYQcCYh0O44IUX4KmSpnKtezDt67idDg7njVAKZNOO8LTBBM9b4EZcRZ2z26N01nv65+9II 58zhQntABXoIb+W3dlSShgvrGNM8sRAyUsD/0qrqd3NADcIsikjDGtFXIaIe8bkMz0Lacu3YIf5 7hgtykoPatP8k= X-Google-Smtp-Source: APXvYqyO/A5C+feWKubTl5Y5Nbg7TZpKOd/uYePnUOe+USwqkcuzntM3zu9WjAvZpaD+PLDWAUGONQ== X-Received: by 2002:a17:90a:bb91:: with SMTP id v17mr2937162pjr.84.1565887385590; Thu, 15 Aug 2019 09:43:05 -0700 (PDT) Received: from rj-aorus.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id s6sm3142547pfs.122.2019.08.15.09.43.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Aug 2019 09:43:04 -0700 (PDT) Subject: Re: [PATCH] i2c: iproc: Make bcm_iproc_i2c_quirks constant To: Nishka Dasgupta , rjui@broadcom.com, sbranden@broadcom.com, bcm-kernel-feedback-list@broadcom.com, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20190815055550.1588-1-nishkadg.linux@gmail.com> From: Ray Jui Message-ID: <4f71a174-9ded-172e-9c34-c492aee3c3e8@broadcom.com> Date: Thu, 15 Aug 2019 09:43:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190815055550.1588-1-nishkadg.linux@gmail.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190815_094308_007385_96A5D886 X-CRM114-Status: GOOD ( 17.56 ) 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: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Nishka, On 8/14/19 10:55 PM, Nishka Dasgupta wrote: > 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 > --- > 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, > }; > > This looks good to me. Thanks! Reviewed-by: Ray Jui _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel