Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp516142lqi; Thu, 7 Mar 2024 04:19:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW2dReP16n7+tAmPTdmFk2ogLILu4wQwVxdcEgFjyXh9iSiIB8GjRLLG7zDp5PurwuGBACpD4eF4lmavQSW6MeEDsC9KSxROnnll71iqw== X-Google-Smtp-Source: AGHT+IEK+fe17jIyrEij137yp7NH74hJOOdZvrPoVVgC/9Ng61TYVcpaGLnV1cOBF9dr4MXUHy+i X-Received: by 2002:a50:cc08:0:b0:566:1127:4bb5 with SMTP id m8-20020a50cc08000000b0056611274bb5mr11042313edi.1.1709813967030; Thu, 07 Mar 2024 04:19:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709813967; cv=pass; d=google.com; s=arc-20160816; b=HHCNdlDrKX9u0irM9dD3cEjuBLtNN83bzi3fWPgoZebFPQuoFtVqB9sZtoZOCBjklQ o/fBV1MfOgWznS/YCQWin05xlWHq2cFPHCjj7bUcLNnAqZdhYmBmis0QILeMVjHF8a9M 53fTVI0lUtLZJAxicTJTR6Xz7vEXP6DkGQXtsCDlRMRQEP1O4v16JHbKscGOGdnEIFCi 8w2G1c1WkdUAdRVK14gDbF6EQhTMqPZVhYcKc0+qH5pD/b3E6o/wnjHFynFyL4Du/UBE AyjvWovlpmP2TtFpr4CCIoEupsjeiTFZExb4RU1HKuPOAiqmqREbQwUu1cGAUybZ4WuK 2GlQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=u8T54HsQYqE15zF6npktG+c1gBfB1he1JY213suWjik=; fh=65STyoOVQsPU/ppobwqkmVuInmCh5rHLUbVuRgRKijU=; b=j51YbfjODiFMC1ORi1aMm9ik3+JXSpheCcQ3TlfP8uEp26BhPKKkjd5QJ/U+laxRQ7 JRxxPWFJtPz/AOiKt7LXHsEUI+JRMB+IleiC0zpSjtJh/W1wTKdwjgG2H42z6yoc27GV lGyPv9xp7c693OaYHY9U3qVEy9oMrE3Q0di87NwZcF7ZzOrVrXBk/bbkd16pSbVmYzfz gYO04ei+ufLWeTOI1F45TQ15GedO/PtTYOZtd0CchdEH6zcUDN1TkX+myD/xAj2bp+HC 3RvoFnJYT+/ChCDPYK7G0AnSuU8xzP3ikxoVIs5fgjSO0G4AKdyqphO81o6v91wmgXFP 9zSw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IyV5mjcO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-95520-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95520-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id x43-20020a50baae000000b00566409d83b6si6899602ede.488.2024.03.07.04.19.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 04:19:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95520-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=IyV5mjcO; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-95520-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95520-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C07E31F22AA3 for ; Thu, 7 Mar 2024 12:19:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7742B12A168; Thu, 7 Mar 2024 12:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="IyV5mjcO" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F393782891; Thu, 7 Mar 2024 12:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709813958; cv=none; b=muYLZan/6hTR83yIIEhTeEMeSAv7dhIMARyo3DOcBPQcjhbQWBDHAvGow8jRPcBOL/qyLiyCjUfGbwNMOzTzuNEKJge28nzuabAoEAevH4IHx9wZllve+IfBcfu7YFMip3ownf6JFpmt2AlUhziRbUe7rNTAMSznocHNeNfZ9P4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709813958; c=relaxed/simple; bh=/+IFJS/KcSf7DigBEvxed/q/2MkAOrk0j7DkIz+cw78=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KR5t1vBdFyNqjxHmIfdweDuMRlX3Ka264z/ckVoBvdP4OG2hMs8GT0EFWsBKamXrDOgCJnKUUuvrhnS8ewUlZTOLVfOaUZ9haBZgL4nmpQRrAA3YHfLs22N4rnYYsa58yY5OQXCnv9pgt1ShaL1ryWfLIbu2i4h42Af8YJ2pjz0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=IyV5mjcO; arc=none smtp.client-ip=192.198.163.17 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709813957; x=1741349957; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/+IFJS/KcSf7DigBEvxed/q/2MkAOrk0j7DkIz+cw78=; b=IyV5mjcOx+DY33afnUgopBNTdYCTmpLcWOZJNI1Ao3Nx3kP/WDmtRg1m wtEF7X+cv1v/aLn8XTK2el75A7iXJbWfhtgAnTrPVH2ZQ/IE3VNtzORCb NA4Kg0Di6LJU26heAFXomFrmpDn5eNK9w6SD2E9FwDdY4SHV8wMLCgEmt XKj3M3b6TaaUVLRV/fqtuCR7KGUt5YAoq/PN8RW8s9KElZDH/IQEhmxh8 PUIY+pPNY9Gwp6/Hqssz6SOiOMkszIO4nJ3M+XXWJIq9cHk8pZ5Me4haF vgvzPLEkV6fMaBj4yG/n1B1TevUlnm2d6/qyPO/EdsBwwUpuHyjePMfsH A==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4342809" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4342809" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 04:19:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="937045962" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937045962" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 04:19:14 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 370B9193; Thu, 7 Mar 2024 14:19:13 +0200 (EET) From: Andy Shevchenko To: Ulf Hansson , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Ben Dooks , Jaehoon Chung , Adrian Hunter , Andy Shevchenko Subject: [PATCH v1 1/1] mmc: sdhci-s3c: Replace deprecated of_get_named_gpio() Date: Thu, 7 Mar 2024 14:19:12 +0200 Message-ID: <20240307121912.3676850-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit It seems the of_get_named_gpio() is solely used to check if the GPIO is present in DT as the function can return 0 if and only if it's present and it becomes in the global number space 0. But this quite likely shows that the code wasn't ever been tested on the systems when no GPIO is provided. In any case, the proper test is just to call of_property_present() without any attempts in requesting GPIO (as we haven't saved the number or descriptor anywhere in the code). Signed-off-by: Andy Shevchenko --- drivers/mmc/host/sdhci-s3c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c index 0e8a8ac14e56..6493b0edba34 100644 --- a/drivers/mmc/host/sdhci-s3c.c +++ b/drivers/mmc/host/sdhci-s3c.c @@ -17,10 +17,8 @@ #include #include #include -#include #include #include -#include #include #include @@ -446,7 +444,7 @@ static int sdhci_s3c_parse_dt(struct device *dev, return 0; } - if (of_get_named_gpio(node, "cd-gpios", 0)) + if (of_property_present(node, "cd-gpios")) return 0; /* assuming internal card detect that will be configured by pinctrl */ -- 2.43.0.rc1.1.gbec44491f096