Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp760274pxj; Thu, 13 May 2021 16:42:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdznfB1HesejI145ffeUrFa0otiEpON75BlXOmhEwiFED2FweVjf30N4VBuZWHvkEvxMdY X-Received: by 2002:a17:906:2cce:: with SMTP id r14mr31205225ejr.38.1620949339394; Thu, 13 May 2021 16:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620949339; cv=none; d=google.com; s=arc-20160816; b=FJQX1478mL9unlbVy+3hDV0wcQRdk5aSCtuVfzua2a/Y1E1EQK79zK70f75zdXe2L3 O1OjOyKcNvdhKU435YK3xQds/Lv6Lots1p+6k0yPHz+pUpHHAuSKNQR9rXmnaLjMXX6f OWSjHPzd84ioq5gQBiYnsjuwq4tCsvAnz8gMEBzCLRBHhr99H8Dm7G1Vm9Q+XJ4CA/AY Y4xEnFG/bhUnL568wguBc8z6DkLrJNz/erTPtonLs61Kyr8hNYApTV9FGmgC2pWVsWx7 Y72RKgWMuVCb+MFnmVmtyPvTk3HAGAxHVNcfZrHaiJ0C33gHme/1bTHjBaCMhHnU+SCU aoww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Jxf9jaPVKrVN10b1Yr8Cdt+6V7OtY9FoC2+vz0B4zXI=; b=t9C5tHh02YGyydOGPs+ttDFeEtc/O/V/TWgYEMJ35FpRLNB2IkfuCB0Bvt2EodH5Qe NE78KLf9TneMpSGndCtcni71s5BEbebNxQFDObnwuQmXHbsQA20LW+voETanOj86YXGN QaH6teD4Ci2aMa0bjGVK+ld/bpDrtWNtAL3u106qYQdc11hSyxAGJwz/YKilxhnSCbXY RAWE9v0l0LZhNbceM1qqlqZWTrEte9mHZS9iW+FGDm1VaTnj9eITbZViU8pca55V7R// 3FPoAkQ6DGXxIAQO+wKJuQPUVFfDg2cY6efytvDd4r7rbk3xyTgEkrYfW3Vk2IUIwMGH hpRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cJLYDPYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ia10si4432163ejc.582.2021.05.13.16.41.55; Thu, 13 May 2021 16:42:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cJLYDPYy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232463AbhEMUK1 (ORCPT + 99 others); Thu, 13 May 2021 16:10:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232412AbhEMUKY (ORCPT ); Thu, 13 May 2021 16:10:24 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C3DDC061574; Thu, 13 May 2021 13:09:14 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id c3so40155220lfs.7; Thu, 13 May 2021 13:09:13 -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=Jxf9jaPVKrVN10b1Yr8Cdt+6V7OtY9FoC2+vz0B4zXI=; b=cJLYDPYytrPRYiG9h/uzjB7fFy1ElNt9yk4YCZpwchSCrU6xsrfTH9+XbdEsTe+0Uq ISAkn5iJzOMKzQJxSekK0/p2dVBLDaMOEOYh9did276nub/I7X14F8n9SvYl9gxMwGRv 8SePcpFfr/1lRdM9ObxcZVduXHkFwR+OR3j150/ZzZgxynUTMUpSofPqLNyIRNIeGcwm pFY+gtSYkk3Q260bXnI122L1Y/+HYDIUOglzGyL36Pogw5xIrVmHbJmM+eecN1yrCMet gPsFI3lmcKWO6DZV2EzfR2K9Cjbf+UZAoeXejiX5ExG4/aWSxQQqWslF8/en2cvKjUDB LdSA== 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=Jxf9jaPVKrVN10b1Yr8Cdt+6V7OtY9FoC2+vz0B4zXI=; b=VTt0gvst7MdtxFcg8nsymuK7ucpLySOwGBQnzdK4Au/+vqrN82B44uK2M8W47dE8UE dx6IKkS2RKgb9fUogON4638hVyYqUMwovQ0XEWbmY0vqpdr0/S4c3YYG0LWp/nhJmknP pbWrR2hV5wPwgK0VYIcL5q18hwfsJupU2zvWFKZq3VVbVoXDnpYOgNfXnLrUIWLI0a7P Cwns3SRlp0jNRJYogk27u6g1NC0IbFPg2ivIqA+WdfRuYdfnLehNyEkWW515DNEDWzWo RKaPhh//bHLrEgMa9C3eqwSCr+4RKLaQgRXqooAapsX6HY5V42rPNMLcNRxbtB/mmwaS nlUg== X-Gm-Message-State: AOAM531mIQkx0X5wr7PxcXBieX4uQ7ytegg4tOSe1BdoWcqCXmOIqqh0 oFzFIvmWoXxwhjOtu+TKDlo= X-Received: by 2002:a05:6512:25c:: with SMTP id b28mr7581024lfo.94.1620936552616; Thu, 13 May 2021 13:09:12 -0700 (PDT) Received: from localhost.localdomain (h-98-128-228-193.NA.cust.bahnhof.se. [98.128.228.193]) by smtp.gmail.com with ESMTPSA id u12sm107054lfc.75.2021.05.13.13.09.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 May 2021 13:09:11 -0700 (PDT) From: Rikard Falkeborn To: Felipe Balbi , Greg Kroah-Hartman Cc: Thierry Reding , Jonathan Hunter , linux-usb@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH] usb: gadget: tegra-xudc: Constify static structs Date: Thu, 13 May 2021 22:09:08 +0200 Message-Id: <20210513200908.448351-1-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Constify a couple of ops-structs that are never modified, to let the compiler put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/usb/gadget/udc/tegra-xudc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c index 2319c9737c2b..66b19db4c6e6 100644 --- a/drivers/usb/gadget/udc/tegra-xudc.c +++ b/drivers/usb/gadget/udc/tegra-xudc.c @@ -1907,7 +1907,7 @@ static void tegra_xudc_ep_free_request(struct usb_ep *usb_ep, kfree(req); } -static struct usb_ep_ops tegra_xudc_ep_ops = { +static const struct usb_ep_ops tegra_xudc_ep_ops = { .enable = tegra_xudc_ep_enable, .disable = tegra_xudc_ep_disable, .alloc_request = tegra_xudc_ep_alloc_request, @@ -1928,7 +1928,7 @@ static int tegra_xudc_ep0_disable(struct usb_ep *usb_ep) return -EBUSY; } -static struct usb_ep_ops tegra_xudc_ep0_ops = { +static const struct usb_ep_ops tegra_xudc_ep0_ops = { .enable = tegra_xudc_ep0_enable, .disable = tegra_xudc_ep0_disable, .alloc_request = tegra_xudc_ep_alloc_request, @@ -2168,7 +2168,7 @@ static int tegra_xudc_set_selfpowered(struct usb_gadget *gadget, int is_on) return 0; } -static struct usb_gadget_ops tegra_xudc_gadget_ops = { +static const struct usb_gadget_ops tegra_xudc_gadget_ops = { .get_frame = tegra_xudc_gadget_get_frame, .wakeup = tegra_xudc_gadget_wakeup, .pullup = tegra_xudc_gadget_pullup, -- 2.31.1