Message ID | 20230516110038.2413224-18-schnelle@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp353762vqo; Tue, 16 May 2023 04:33:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ57S9yECGL25Y26knhSMVmfBXLz5C72d8zJZoeojlGCFanxYCMVA3Fe6pFCS/K6fBbbOvgI X-Received: by 2002:a17:90a:de91:b0:24b:2f85:13eb with SMTP id n17-20020a17090ade9100b0024b2f8513ebmr35974324pjv.30.1684236809491; Tue, 16 May 2023 04:33:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684236809; cv=none; d=google.com; s=arc-20160816; b=gOlAsWGgxgteb1RVBAHFCgpSKt2xuSChj/JqF7dQK0eBIt3YBt1rVv1wh7/7Mx0Ksg 1G+FRy/hSwgNkNy0NzN2P8AGy60Q7npLjEZatxxUYqBXi/7WDHHMqNuG2NMI2wuRQWZ0 cXRUHwC6ECJHYgwVDMo8sR2S82VHfeKzLBjlH5Rm5pePAmybEjjO0fwn6NqZeTrOEfdM jdsJzjv/rqFzaQ9zMctUzOZ8HT47A3PcAhM4HkO5FBA3yoebv9M4nh9TJ0kcQ4veM3W8 H6fXbzRaB+spAYXbrc0c9G5+gAP8Y8cAm4O+UFTF+Nwp/bADWAD87ELH+ceHA9bNjh2x jouA== 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=Ux5bNjSHBfHLfF5jTN2BHiRqPZahkulOIMcZWVQu/hY=; b=FcHxrDzEwXQOubaliHIu80gepmLggRmktQBqWZvpG9Y05ejTaCeaWuPil+ay+qPOQo Q1nJV5uh0L01ntwRyrimrnijIXp06F+/B8hXf/fZUGBQ8B7sTrv3yv2iTjutsZriXSBr PwSMK/r2UcU4EEtVHtcdW6RjvGxnmbX0fW0f4DxNcD76ARdn4Ia1in2hcdF25HYuzd5V u8n6zt7v3X/27BZcu5YJ0taAGyISiEheBCDzlexCJcFZ78ZPOU+n3x9aD35Uw3fqwyXE TwISnpC+GxgsUUOYC6c1MQ3edwtLgyd3AQj3+bWkvnBdjmAeSXh5xbogs9G0IJzWSCCj rtqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Qpx7f+1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m2-20020a17090a414200b002478bba4da2si1583586pjg.127.2023.05.16.04.32.56; Tue, 16 May 2023 04:33:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Qpx7f+1O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232607AbjEPLCJ (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Tue, 16 May 2023 07:02:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232566AbjEPLBn (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 16 May 2023 07:01:43 -0400 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F388B59D2; Tue, 16 May 2023 04:01:12 -0700 (PDT) Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34GAqst0014170; Tue, 16 May 2023 11:01:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=Ux5bNjSHBfHLfF5jTN2BHiRqPZahkulOIMcZWVQu/hY=; b=Qpx7f+1O3fdecKQxQvNDBTvsasnkTApox2cDcMqieTgswT6GWmHctccFMkMbGIfU5hf0 mETcrsUCCy8OBfbCpXCYf1Mz/cAscvJ83FsQnXHACdM0kWZaNr4AiI1AXxrBGizhbgRl t4HdyxMERl44W1E4v8fLPxE2sEtDzvGAphU2AZSWqTWz7cWeodoCyZp5XkRaTSc29Piz VDv1uj66w1N4U8WKvMkizEcqWoOPPMO/yS/VMe89Ld07GOZvBxl64r9rYbz4fD61PHwu Yfkw8z5RohyColgjaf88NOuCwuR+1q6QdnyFN8JslfYx4xT2dMyYe8NvvCyEY1AwT+Zx AA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qm7xj12mq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:00:59 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34GAfeNR002813; Tue, 16 May 2023 11:00:57 GMT Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3qm7xj12kd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:00:57 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 34G9c3Ej016961; Tue, 16 May 2023 11:00:55 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3qj264sjvg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 16 May 2023 11:00:55 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 34GB0r5T37814732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 16 May 2023 11:00:53 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 46DF52005A; Tue, 16 May 2023 11:00:53 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC79C2004D; Tue, 16 May 2023 11:00:52 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 16 May 2023 11:00:52 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Bjorn Helgaas <bhelgaas@google.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Alan Stern <stern@rowland.harvard.edu>, "Rafael J. Wysocki" <rafael@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann <arnd@kernel.org> Subject: [PATCH v4 17/41] misc: add HAS_IOPORT dependencies Date: Tue, 16 May 2023 13:00:13 +0200 Message-Id: <20230516110038.2413224-18-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230516110038.2413224-1-schnelle@linux.ibm.com> References: <20230516110038.2413224-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pObga1oqwEHqa_aHuT-id6QY-DuVV_20 X-Proofpoint-ORIG-GUID: h5ZbgxcXVqgqH20Wh_z6hEqhp27NSiii X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-16_04,2023-05-16_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 clxscore=1015 adultscore=0 suspectscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305160089 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766050296967436577?= X-GMAIL-MSGID: =?utf-8?q?1766050296967436577?= |
Series |
treewide: Remove I/O port accessors for HAS_IOPORT=n
|
|
Commit Message
Niklas Schnelle
May 16, 2023, 11 a.m. UTC
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends not being declared. We thus need to add HAS_IOPORT as dependency for those drivers using them. Co-developed-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Arnd Bergmann <arnd@kernel.org> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> --- Note: The HAS_IOPORT Kconfig option was added in v6.4-rc1 so per-subsystem patches may be applied independently drivers/misc/altera-stapl/Makefile | 3 ++- drivers/misc/altera-stapl/altera.c | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/altera-stapl/Makefile b/drivers/misc/altera-stapl/Makefile index dd0f8189666b..90f18e7bf9b0 100644 --- a/drivers/misc/altera-stapl/Makefile +++ b/drivers/misc/altera-stapl/Makefile @@ -1,4 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only -altera-stapl-objs = altera-lpt.o altera-jtag.o altera-comp.o altera.o +altera-stapl-y = altera-jtag.o altera-comp.o altera.o +altera-stapl-$(CONFIG_HAS_IOPORT) += altera-lpt.o obj-$(CONFIG_ALTERA_STAPL) += altera-stapl.o diff --git a/drivers/misc/altera-stapl/altera.c b/drivers/misc/altera-stapl/altera.c index a58b7cb81d98..587427b73914 100644 --- a/drivers/misc/altera-stapl/altera.c +++ b/drivers/misc/altera-stapl/altera.c @@ -2407,6 +2407,10 @@ int altera_init(struct altera_config *config, const struct firmware *fw) astate->config = config; if (!astate->config->jtag_io) { + if (!IS_ENABLED(CONFIG_HAS_IOPORT)) { + retval = -ENODEV; + goto free_state; + } dprintk("%s: using byteblaster!\n", __func__); astate->config->jtag_io = netup_jtag_io_lpt; } @@ -2481,7 +2485,7 @@ int altera_init(struct altera_config *config, const struct firmware *fw) } else if (exec_result) printk(KERN_ERR "%s: error %d\n", __func__, exec_result); - +free_state: kfree(astate); free_value: kfree(value);