From patchwork Wed Jan 1 07:43:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1216942 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=inria.fr Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47nkdD6GLQz9sSR for ; Wed, 1 Jan 2020 19:20:48 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727360AbgAAIUo (ORCPT ); Wed, 1 Jan 2020 03:20:44 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56955 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727194AbgAAIUR (ORCPT ); Wed, 1 Jan 2020 03:20:17 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578762" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: "J. Bruce Fields" Cc: kernel-janitors@vger.kernel.org, Chuck Lever , Trond Myklebust , Anna Schumaker , "David S. Miller" , linux-nfs@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 12/16] SUNRPC: constify copied structure Date: Wed, 1 Jan 2020 08:43:30 +0100 Message-Id: <1577864614-5543-13-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The empty_iov structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall --- net/sunrpc/xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c index f3104be8ff5d..e5497dc2475b 100644 --- a/net/sunrpc/xdr.c +++ b/net/sunrpc/xdr.c @@ -1079,7 +1079,7 @@ void xdr_enter_page(struct xdr_stream *xdr, unsigned int len) } EXPORT_SYMBOL_GPL(xdr_enter_page); -static struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0}; +static const struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0}; void xdr_buf_from_iov(struct kvec *iov, struct xdr_buf *buf) From patchwork Wed Jan 1 07:43:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1216938 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=inria.fr Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 47nkcl0yZ8z9sSJ for ; Wed, 1 Jan 2020 19:20:23 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727260AbgAAIUT (ORCPT ); Wed, 1 Jan 2020 03:20:19 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56964 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727222AbgAAIUS (ORCPT ); Wed, 1 Jan 2020 03:20:18 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578763" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: Richard Cochran Cc: kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure Date: Wed, 1 Jan 2020 08:43:31 +0100 Message-Id: <1577864614-5543-14-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The idtcm_caps structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Richard Cochran --- drivers/ptp/ptp_clockmatrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c index a5110b7b4ece..e85836715f0b 100644 --- a/drivers/ptp/ptp_clockmatrix.c +++ b/drivers/ptp/ptp_clockmatrix.c @@ -1102,7 +1102,7 @@ static void idtcm_display_version_info(struct idtcm *idtcm) product_id, hw_rev_id, bond_id, csr_id, irq_id); } -static struct ptp_clock_info idtcm_caps = { +static const struct ptp_clock_info idtcm_caps = { .owner = THIS_MODULE, .max_adj = 244000, .n_per_out = 1,