Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2442322iob; Sat, 30 Apr 2022 08:39:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBeZL/r3tRAgO0D+WRmRI7wFiW5pRzJVuWDVQt76U6fqTAeZxUw1fWMcTyCF4b2qDUyR6x X-Received: by 2002:ac2:4d32:0:b0:471:fa43:ad01 with SMTP id h18-20020ac24d32000000b00471fa43ad01mr3198662lfk.276.1651333162368; Sat, 30 Apr 2022 08:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651333162; cv=none; d=google.com; s=arc-20160816; b=tXOr4DjuG2bdxW/kHYnzuG1BvLlS1VSWlIMGKjxuxdqN+3+FzE4Wq9bcIgWIuopY5E 3F5I1TD/12Gu6mGnjMAHPfEXzW2cp8NM45MH8yqa1Q2ItW3i5EWOCQ3ddsL27h7tBP67 Jq4RurZe7GYjVauEl77Pr5w5jLzT1KWWo5AtIFsKpLxtxoBtvv0pemq2tfnqOQuskDld pPpm8qna7l3lrmxT5RQZq74bH0e0tqGrZt54ftUcIScUepukSmV+VuYOftXTGQGU5EUW dMBSmba3flPWMfmzK4d6kSQ1HBl59EoKNAt5A9yyg16qhj7liZ8pUeHaprtrX+wuOfNq XQxA== 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=eMl8tQDaDN1HV91Ge+PUDnw13YZogPtzCK2phLsIqLU=; b=Mi++76JTU8zIqaa6aGg5mMNyCc2C5lQAxbBch9Ax9OmHV2Hu8b+FbD+O0Pt0H/LVWX +eMOWaLDBofUB/RMrsECgcW4vIFYo+8vF0uAE3hC3OdBrUt89mLMpmNCiCBQhMtUQTmA bpMFTyzTPLMtBVSk6ARuWM+OCqIC/2sgjH2xjd3PBs6BD78plgfaDVMMr/NnnVoScwt1 4yDIQajXkc8RTIgYQZPI1UuougjHt3LBrb2O6UWsUNEZiTY1FrqPpWCoqdLFzcuJYEZY ju3Ykwsf8uQHCa6M9UzylbMIkFvmA8M8slFgHPRXmVOq4H6bjCdLfHB4CvMm19/3LUMx c+Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=m8m6ffkx; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a2e9585000000b0024f0efb77a6si9563604ljh.336.2022.04.30.08.38.55; Sat, 30 Apr 2022 08:39:22 -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=m8m6ffkx; 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=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376662AbiD2N4E (ORCPT + 99 others); Fri, 29 Apr 2022 09:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51146 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376434AbiD2NzS (ORCPT ); Fri, 29 Apr 2022 09:55:18 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A060E63388; Fri, 29 Apr 2022 06:51:35 -0700 (PDT) Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23TC2ATh022454; Fri, 29 Apr 2022 13:51:31 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=eMl8tQDaDN1HV91Ge+PUDnw13YZogPtzCK2phLsIqLU=; b=m8m6ffkxcJdPo4eHD/eQ7I0NWE0pNa/WygeCZsy1vzAUgmiUuBH9KuyT7SRsDtBdf0Mx S26TjVVAlQOlE2jhWkrLSEVr13oXgjyVszeXbeCXprqqG7rhs7fGJIuVj4dMrgRKJWnx jfwTpIHd6j94TE3YAUE5p6CcwnSrh1Sw0qTq8lJG1R5EXpO5w0SZMkAYGKgEuNreM97S wA1FFykvvmjJKXK0FZGsCTnopvGdXwnl8fKMN/1IxButaqpmH9Ji6eoCoZsMPdd6F7sS H2MW3tpqWv7skCV8po6TAgTuq50tptVJNB1UWf29dmYf3nF8rifmQ/WSDqAM66ApqXlZ CA== 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 3fqs3npug9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Apr 2022 13:51:31 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 23TDQfA2021506; Fri, 29 Apr 2022 13:51:29 GMT Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by ppma03ams.nl.ibm.com with ESMTP id 3fm93917r3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 29 Apr 2022 13:51:28 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 23TDpQwp33882474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 29 Apr 2022 13:51:26 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 946314C040; Fri, 29 Apr 2022 13:51:26 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5B0AC4C044; Fri, 29 Apr 2022 13:51:26 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 29 Apr 2022 13:51:26 +0000 (GMT) From: Niklas Schnelle To: Arnd Bergmann Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann Subject: [RFC v2 18/39] misc: add HAS_IOPORT dependencies Date: Fri, 29 Apr 2022 15:50:28 +0200 Message-Id: <20220429135108.2781579-31-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220429135108.2781579-1-schnelle@linux.ibm.com> References: <20220429135108.2781579-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: fQuRGyGp1W0ZmaLtzvkM9sFwolwoNQRA X-Proofpoint-ORIG-GUID: fQuRGyGp1W0ZmaLtzvkM9sFwolwoNQRA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-04-29_06,2022-04-28_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 spamscore=0 phishscore=0 adultscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 malwarescore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204290078 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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Niklas Schnelle --- 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 92c0611034b0..c7ae64de8bb4 100644 --- a/drivers/misc/altera-stapl/altera.c +++ b/drivers/misc/altera-stapl/altera.c @@ -2431,6 +2431,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; } @@ -2505,7 +2509,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); -- 2.32.0