Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1000868ybt; Fri, 19 Jun 2020 21:10:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHuG3mA65iCXWuyQRRci72rFuBFNUIPRmNoEeMKV6EixhqAutbza/jz752Sj5eSSasfB2h X-Received: by 2002:a17:906:c14f:: with SMTP id dp15mr6475413ejc.454.1592626244038; Fri, 19 Jun 2020 21:10:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592626244; cv=none; d=google.com; s=arc-20160816; b=nF9abk5laIQ5KDdcifcGt5RHTXdvaYFTVWj6SLbxfo+yuiHoZyrsCccahMDSPc9MRV 60KxuXREhqpiIMkAIJzzQt9DZDzAa7VyGnm6iWA22+VDoOkxNym+1KYL85jPYMYvRL0a YuI5i6IwajbiCMvVT+pispc4u/qgxCZHDjKpyNOk5ob/oyzM+3wcpNEn1aHwtOxhqWx9 rzKSi/WuJj5lTSkAV4isGseNdnWVTAqVC1StdS+7/nDPByYGi2vimkGFf1bGzQsHruKk EL1gEmqGr6VIjZ5FkOuUMiKRQz0KQIFOECqfSCUJ99ANEf1u97KGiG6HCov1NNjgFvwX hVYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=deBFgqQsn29BKU1li5WxzXz3E5pSnxMmm7hLo5Yt+Ac=; b=EnkJS608zpycDUR0yFoutcpQGQME78dunYjliuTpS3ByvOzj94OjWcET5OJQSCfAGL lGZNm9eoNSZomXldJOipWF2F4MCRS22rpn5KBMZgNnaSW9rmMufaUn2MuYlBqkFZvFye nVAyvcLi1mreMVa7qUmC5jfHZlsV+yupLtfOoh+YQaAk7nTrhVk80Inq5yWfirgY0R0D Edpwxj1mbvWBUwQc6xqncMvaxdENmCJtXnbaKnbQ5+4usj2WY6ipijcFbx1UK9DhsRnh xLqowz8sUsqoQNroJLTODj51w6mfTeXn/QB9uT18OEF941vO3pvXAWlI3frgWpY6L9bv GACA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y14si4981144edu.550.2020.06.19.21.10.20; Fri, 19 Jun 2020 21:10:44 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405936AbgFSQv7 (ORCPT + 99 others); Fri, 19 Jun 2020 12:51:59 -0400 Received: from mga18.intel.com ([134.134.136.126]:45043 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405892AbgFSQv2 (ORCPT ); Fri, 19 Jun 2020 12:51:28 -0400 IronPort-SDR: 2F22wEE2dA706uN30qFDsArsYySyknPCRwjaxcHGSnUrHFkxzrXbUG1J965UtM2fUqIOgMbILU 1/bQh6rMQfKw== X-IronPort-AV: E=McAfee;i="6000,8403,9657"; a="130381909" X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="130381909" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2020 09:51:27 -0700 IronPort-SDR: 9fnLjzgCQrHjTsRiE2SA26mLSv8i3khQqfkYmfiUlgbaRC96DZsdfnVGS6aKiveVaLCKQlV/vr hBIoW1VqSH8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,256,1589266800"; d="scan'208";a="318165121" Received: from twinkler-lnx.jer.intel.com ([10.12.91.138]) by FMSMGA003.fm.intel.com with ESMTP; 19 Jun 2020 09:51:26 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler Subject: [char-misc-next 2/7] mei: me: constify the device parameter to the probe quirk Date: Fri, 19 Jun 2020 19:51:16 +0300 Message-Id: <20200619165121.2145330-2-tomas.winkler@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200619165121.2145330-1-tomas.winkler@intel.com> References: <20200619165121.2145330-1-tomas.winkler@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The quirk_probe there is no writing to pci device hence we can constify the passed pci_dev pointer. Signed-off-by: Tomas Winkler --- drivers/misc/mei/hw-me.c | 6 +++--- drivers/misc/mei/hw-me.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index f8155c1e811d..b45143510912 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -1353,7 +1353,7 @@ static const struct mei_hw_ops mei_me_hw_ops = { .read = mei_me_read_slots }; -static bool mei_me_fw_type_nm(struct pci_dev *pdev) +static bool mei_me_fw_type_nm(const struct pci_dev *pdev) { u32 reg; @@ -1366,7 +1366,7 @@ static bool mei_me_fw_type_nm(struct pci_dev *pdev) #define MEI_CFG_FW_NM \ .quirk_probe = mei_me_fw_type_nm -static bool mei_me_fw_type_sps_4(struct pci_dev *pdev) +static bool mei_me_fw_type_sps_4(const struct pci_dev *pdev) { u32 reg; unsigned int devfn; @@ -1395,7 +1395,7 @@ static bool mei_me_fw_type_sps_4(struct pci_dev *pdev) * * Return: true in case of SPS firmware */ -static bool mei_me_fw_type_sps(struct pci_dev *pdev) +static bool mei_me_fw_type_sps(const struct pci_dev *pdev) { u32 reg; u32 fw_type; diff --git a/drivers/misc/mei/hw-me.h b/drivers/misc/mei/hw-me.h index 52e0c6d578f2..4df51cb8fa4b 100644 --- a/drivers/misc/mei/hw-me.h +++ b/drivers/misc/mei/hw-me.h @@ -25,7 +25,7 @@ */ struct mei_cfg { const struct mei_fw_status fw_status; - bool (*quirk_probe)(struct pci_dev *pdev); + bool (*quirk_probe)(const struct pci_dev *pdev); size_t dma_size[DMA_DSCR_NUM]; u32 fw_ver_supported:1; u32 hw_trc_supported:1; -- 2.25.4