Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp663682pxb; Wed, 29 Sep 2021 07:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzd/iNiZ11XSzNSf0isNZ41nrCFih8UAojS84cnzefJ4yVEeno5g17jbPWWcnfmL7lB+NMW X-Received: by 2002:a17:90b:4a44:: with SMTP id lb4mr6719318pjb.140.1632924924212; Wed, 29 Sep 2021 07:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632924924; cv=none; d=google.com; s=arc-20160816; b=Bpbvs6C2EexULR4opOKYRZD13Lhvg7ZnE55hD3PEXx73SSBqpZMZ8k6iuaAl47RZOP UvnZv124GJWMOoZ/1I9L5tVBcrfjoGaVeqVnUKWaQquvpGLEw9UtTsXWdi/V6ZiOeiCG TKIRnOHjKW6u6rs/wNHLeXwjIureKUxcl9YjpPiPeEIEYOQ67OC04b90VA7AuE8fhGiZ f1j7pG35Vzs2P1y1aXlRfNRYHHGOvYTHWrQXfMnbDHPdbq/IEFwD7IAMSste0Ix8eV8u m8Izd5H5+hKqexxXInmi3h9kqZjeEhnsrbtL6X98wWaqE1i5YUsvSkm5sJkgaYDM+Lte ncdA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OGgy6PY9R3yl/0r3hvANVaQGDrHRDnCpCti/cTSOZWk=; b=NtZxNNGsxcRhn+rBSgOIKUJZhwSY/a+kHg4QTJ0Pj+t/uKPI1MMSHjee4Xh5jcNR8q MWoVMmNJXC0Tjk3HfaxpHTi6SEqX1nesTXHPpyMiKee/H4Ib2B7MfwcEZ9QeqUOnXsrX NgMKzF7q80VMcolZNCl/EE1I68VdO5ZXjlGqMJR6ALAjEReoaWXWr4kfrU4W2+kBqYVm fvMgFsnbgHydWoSoUTo/fsqv/iGfETCQuIyL6qh44dO8zmX3zqm/9vYGqD7/0e15xx22 HVrmYNMvOir9BmjRHsxIi8995ThcxVg3wDJWq3gQnClIO7kiKIy4h53f3QlU5/032LlL NsXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="bZZ/ymz9"; 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 y187si2704617pgd.489.2021.09.29.07.15.11; Wed, 29 Sep 2021 07:15:24 -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=20210112 header.b="bZZ/ymz9"; 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 S1344061AbhI2NYE (ORCPT + 99 others); Wed, 29 Sep 2021 09:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344148AbhI2NYC (ORCPT ); Wed, 29 Sep 2021 09:24:02 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B07A6C061760; Wed, 29 Sep 2021 06:22:21 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id b20so10812602lfv.3; Wed, 29 Sep 2021 06:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OGgy6PY9R3yl/0r3hvANVaQGDrHRDnCpCti/cTSOZWk=; b=bZZ/ymz9a6EE+ghHDYneld/zn5AOqI7cwiEBNW5tD/hJn0XwMOOfakhSake6pab53D 65bsBQnQ7+Ynz6s9g8JKEDs/6BKGs4wZBo0Nx2TbDsxqQY98JWez/ZL/PceJOQVLqk3M 55hzYHJG4D94hmqEhL2rpqAGvYYC9+ZRYT+zAx0yoyq5b6bp7/DtcRdL++GhnpBclsB6 9QnvJ35jB0ShORRCfpDtIy6utEI0tvF35+/xKhlS523ylQbjy2JknfhV3zmaY/L+vpEO g++JhBPOxadhDDz4wQq18KGCX/ozByIIWhyhQ4DjgMzADHuOv+GVJId56pqLrdLMFi9o rwdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OGgy6PY9R3yl/0r3hvANVaQGDrHRDnCpCti/cTSOZWk=; b=ZeRP6hdGvj2pUjTTzX6SUcMMb87q9UpnC4MmOtlR0cbkqbBLRwi/M7wByJXIHQY6b4 hFV+wXiga4mcnQs+oZuM3HOsMwWsYtdPSamg+3uLTNhfPo36wv5LyzQgWHHzuhoY0VTA EHzcVuIrYFbKiGBL2zw/q1i82d1MSwhiomaFcduwwMWPj2mbtnCh845eh5fSegY0kdQR 3fnmtMV7I9jFRI7oncjl7fFyh2vM0pSnRopEzGIoNu19lzPnTJ1ukd5yUdii8KXyS/HE Vq657zlKYKoSuYgbJeMNLXN4bTyXjijmIvBiEgdCCJsjcaQMDmCcOTLVq3/OTF6DT2KE jWzw== X-Gm-Message-State: AOAM532hjuo935YG04uXkyKFyPG7XOtGjqFoTfxrr1UtKok9SVcDaK1m OKVRFr9zd5NucIXIytGxgY+qcDHRMqE4Ng== X-Received: by 2002:a19:711d:: with SMTP id m29mr1012930lfc.132.1632921740148; Wed, 29 Sep 2021 06:22:20 -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 z10sm283695ljc.117.2021.09.29.06.22.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 06:22:19 -0700 (PDT) From: Rikard Falkeborn To: Greg Kroah-Hartman , Loic Poulain , Wei Yongjun Cc: Oliver Neukum , Tetsuo Handa , Junlin Yang , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH 2/2] usb: cdc-wdm: Constify static struct wwan_port_ops Date: Wed, 29 Sep 2021 15:21:43 +0200 Message-Id: <20210929132143.36822-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210929132143.36822-1-rikard.falkeborn@gmail.com> References: <20210929132143.36822-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only usage of wdm_wwan_port_ops is to pass its address to wwan_create_port() which takes a pointer to const wwan_port_ops as argument. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/usb/class/cdc-wdm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/class/cdc-wdm.c b/drivers/usb/class/cdc-wdm.c index 03b25aaaa1dd..e5834f1228f9 100644 --- a/drivers/usb/class/cdc-wdm.c +++ b/drivers/usb/class/cdc-wdm.c @@ -911,7 +911,7 @@ static int wdm_wwan_port_tx(struct wwan_port *port, struct sk_buff *skb) return rv; } -static struct wwan_port_ops wdm_wwan_port_ops = { +static const struct wwan_port_ops wdm_wwan_port_ops = { .start = wdm_wwan_port_start, .stop = wdm_wwan_port_stop, .tx = wdm_wwan_port_tx, -- 2.33.0