From nobody Fri Dec 19 04:18:28 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 566091C68F for ; Thu, 7 Mar 2024 14:36:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822211; cv=none; b=t2+bYx59mAd6PMyCdjwiftddJURSMXdIMCFClI+lRS8ajnF9xDtzlSBZSOwbi2rVBPT7DgoMFLguGHCKE7KsAt0fmIRsL7q/ZC2HkwiF975zvdz9U5U3MLJHOS3epEuLP55V1JytzY+mwdKihAD5f1DbnHoh7nzITE2FOA2TuEA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822211; c=relaxed/simple; bh=5S2VXHGhxOzxNWvUFy88OLCLWKC5Vjs6OqaCwuy/fjo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ej/4zTuHFCZShPF8ZzMv5nhm6a8V8zJuF/QLfyPFEZWuyGIDrYBGSgzOKLxmt7txBIkCO1q/GHWRzbDMfqhZ2mr5carYAxaNMNAIymMErCXj1DiTo6cLCpqSkYrj137VLVl6QCci5ZQrWl5l5evMjqchAQl1NQyjpElo6f+aaXA= 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=KTkmu1YY; arc=none smtp.client-ip=192.198.163.19 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="KTkmu1YY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709822209; x=1741358209; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=5S2VXHGhxOzxNWvUFy88OLCLWKC5Vjs6OqaCwuy/fjo=; b=KTkmu1YYNfj4Y7p5AwRTp8y1l2j/mAVmQztHCH5l/DyPUOSgDj4QSK/G grppEdPjY9BgjWNZnSUKp1qU0JBHYaj0nlUWgaa6gSDp9UYNPx5BFZOZ7 7nrYFuoI9t3fzPJtdWqWUmvoKun+1R53B/FRXNuFN8V2WR/G3IuqP9JG6 nn8MExaVonmJ+fSqiyimp1XJ8dIMRKVJ0411ZVqUxTp+c3K35qvcQC48+ batLbMo3MLVaRnYJRvgCLH8T+Xis9nVw2tjNqXD/9MHPtfnL98BlgVGpr G8oek9dfZCmCtrjtIlad883YKpic6Pxu2Aw1BDAWeBmholVV9Kish2X4k w==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4348207" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4348207" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 06:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046239" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046239" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 06:36:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id EC2333C0; Thu, 7 Mar 2024 16:36:45 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Andy Shevchenko Subject: [PATCH v1 1/5] w1: gpio: Make use of device properties Date: Thu, 7 Mar 2024 16:35:47 +0200 Message-ID: <20240307143644.3787260-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> References: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko --- drivers/w1/masters/w1-gpio.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 34128e6bbbfa..8ea53c757c99 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -6,13 +6,13 @@ */ =20 #include +#include #include #include +#include #include #include -#include #include -#include #include =20 #include @@ -63,20 +63,11 @@ static u8 w1_gpio_read_bit(void *data) return gpiod_get_value(ddata->gpiod) ? 1 : 0; } =20 -#if defined(CONFIG_OF) -static const struct of_device_id w1_gpio_dt_ids[] =3D { - { .compatible =3D "w1-gpio" }, - {} -}; -MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids); -#endif - static int w1_gpio_probe(struct platform_device *pdev) { struct w1_bus_master *master; struct w1_gpio_ddata *ddata; struct device *dev =3D &pdev->dev; - struct device_node *np =3D dev->of_node; /* Enforce open drain mode by default */ enum gpiod_flags gflags =3D GPIOD_OUT_LOW_OPEN_DRAIN; int err; @@ -91,7 +82,7 @@ static int w1_gpio_probe(struct platform_device *pdev) * driver it high/low like we are in full control of the line and * open drain will happen transparently. */ - if (of_property_present(np, "linux,open-drain")) + if (device_property_present(dev, "linux,open-drain")) gflags =3D GPIOD_OUT_LOW; =20 master =3D devm_kzalloc(dev, sizeof(struct w1_bus_master), @@ -152,10 +143,16 @@ static void w1_gpio_remove(struct platform_device *pd= ev) w1_remove_master_device(master); } =20 +static const struct of_device_id w1_gpio_dt_ids[] =3D { + { .compatible =3D "w1-gpio" }, + {} +}; +MODULE_DEVICE_TABLE(of, w1_gpio_dt_ids); + static struct platform_driver w1_gpio_driver =3D { .driver =3D { .name =3D "w1-gpio", - .of_match_table =3D of_match_ptr(w1_gpio_dt_ids), + .of_match_table =3D w1_gpio_dt_ids, }, .probe =3D w1_gpio_probe, .remove_new =3D w1_gpio_remove, --=20 2.43.0.rc1.1.gbec44491f096 From nobody Fri Dec 19 04:18:28 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 F151412F39D for ; Thu, 7 Mar 2024 14:36:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; cv=none; b=OrJljjtb9RHq//mYNFVC7Uw0y9UAXzYe550RWmi0ZyqUg9pPfwEhUxxm3jyW9c/+pNHGulLVOWp30MjVPPdfQJbKE8VaJyDA5nhyhtopCINTy9WRre64NtzBmJdk1lDtv1CCYMpvcejfPEWXFRzRWk8NtFKS1MjWtdBAFtWEm/k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; c=relaxed/simple; bh=xvcS3U4WyCuC99KlUMtUZiggvZqD/+Lbdgm2gFxqUiM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U1q+32Xtx9Y4KW6tyciCwivESrErbRpYGyrEJvAaZfvQMbOr8fQ8gG4R9QU/YHI/wItzk+L4d4IpqRaQO0Gc8ZOhaUoT63FLnumxswevTjP7aG/TIfSaKeC7QQw0kG0pNYHkr/nMn6YBX32moPyF152/+ZSDANWJfOGMw20f9Ho= 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=FwJteYJG; arc=none smtp.client-ip=192.198.163.19 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="FwJteYJG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709822213; x=1741358213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xvcS3U4WyCuC99KlUMtUZiggvZqD/+Lbdgm2gFxqUiM=; b=FwJteYJGJ0R35s8xlUE8942rI4bUFLu5c8YHknqNbNejJXbQdXKhmCKK xu+sELQg2YquukODnO7CgpIyZzWBK8wbmMnpTRRsDaOrzvZknt1jYafFC k9aaPj/ittst5ftdrWDHAC6amor35ig0mq6icTTrzmqE6utk/TZV8PkNJ WbD0XuaWKD/OegbLExsGN0u7euYrcSCS6ot1/ou/9U42Ij6mOP7VujBBL RA/6/Fweq9xBC3A1H+0NU5olv6+fldMjGE3k7PfEsZP/bQC+wQPN3875t HSG1LZEZcl+GWYdFF2Gs3mvAuMWdxCgXk06MM8NyTK9Yj5PrpaGrz+O1B A==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4348216" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4348216" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 06:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046242" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046242" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 06:36:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 021CC4E9; Thu, 7 Mar 2024 16:36:45 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Andy Shevchenko Subject: [PATCH v1 2/5] w1: gpio: Switch to use dev_err_probe() Date: Thu, 7 Mar 2024 16:35:48 +0200 Message-ID: <20240307143644.3787260-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> References: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Switch to use dev_err_probe() to simplify the error path and unify a message template. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-K=C3=B6nig --- drivers/w1/masters/w1-gpio.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 8ea53c757c99..a5ac34b32f54 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -91,18 +91,14 @@ static int w1_gpio_probe(struct platform_device *pdev) return -ENOMEM; =20 ddata->gpiod =3D devm_gpiod_get_index(dev, NULL, 0, gflags); - if (IS_ERR(ddata->gpiod)) { - dev_err(dev, "gpio_request (pin) failed\n"); - return PTR_ERR(ddata->gpiod); - } + if (IS_ERR(ddata->gpiod)) + return dev_err_probe(dev, PTR_ERR(ddata->gpiod), "gpio_request (pin) fai= led\n"); =20 ddata->pullup_gpiod =3D devm_gpiod_get_index_optional(dev, NULL, 1, GPIOD_OUT_LOW); - if (IS_ERR(ddata->pullup_gpiod)) { - dev_err(dev, "gpio_request_one " - "(ext_pullup_enable_pin) failed\n"); - return PTR_ERR(ddata->pullup_gpiod); - } + if (IS_ERR(ddata->pullup_gpiod)) + return dev_err_probe(dev, PTR_ERR(ddata->pullup_gpiod), + "gpio_request (ext_pullup_enable_pin) failed\n"); =20 master->data =3D ddata; master->read_bit =3D w1_gpio_read_bit; @@ -119,10 +115,8 @@ static int w1_gpio_probe(struct platform_device *pdev) master->set_pullup =3D w1_gpio_set_pullup; =20 err =3D w1_add_master_device(master); - if (err) { - dev_err(dev, "w1_add_master device failed\n"); - return err; - } + if (err) + return dev_err_probe(dev, err, "w1_add_master device failed\n"); =20 if (ddata->pullup_gpiod) gpiod_set_value(ddata->pullup_gpiod, 1); --=20 2.43.0.rc1.1.gbec44491f096 From nobody Fri Dec 19 04:18:28 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 C7BA912F397 for ; Thu, 7 Mar 2024 14:36:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; cv=none; b=HjRjXlPBF8qdsFK8yXcJbV4E5UghGo0Rr84o56SL7h3Hv+326puURmEdcUM99nh3E9jNiAs5JmG49rFd5CvOHYXpBQTK2kURdQtDmZbXJ8fosbXw8Vm0OJRZ88BtRzLU0mgazlTZW1oT4Z5Z3e1QAwaExgvYhttAsEP3W5edMTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; c=relaxed/simple; bh=LDu4puO2jg3EmAwgaFHCzMT+TSTj8LnwhcOMFJ2MMsE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZAtoRHT23UDGEASorZ5GFmuhCF0AJyo+hOxzABVJnY3sAXR4Iw38qGHfC9wq3RJ9FWlkWJtwMkI0Zz/kQhIhcgKvA3IiomUHL1+g+3Om93ps3D+H0ZPVbQYdUnMFswVnzvK6knxhYdlSC6xgN/YsN03jZS9dB83ziOj6zNCvPRM= 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=YYlvR/cZ; arc=none smtp.client-ip=192.198.163.19 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YYlvR/cZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709822213; x=1741358213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LDu4puO2jg3EmAwgaFHCzMT+TSTj8LnwhcOMFJ2MMsE=; b=YYlvR/cZ+/k0bPbHlO/kzU3NaMOnMtlPqmzVaYZCUNedbhkU2G8ADxFl PW7oFae4FnyanVpqNUvQji/woVJ/VEsFx3xmTu66X4yakO0pabYvZCboy ZmV/Cp5/AffGrurczbc1fLUgs0cYg+yehiSP4S5UmFsMcO4GHWleMaaQC FSpjzko/9N9lx9AIWHJIJF+QhG4sFDTRgNsMvxiAepeuPZH1alz4bCRgY SC8s/a20Sk4i1DVwYy8Eikpc5v4Cjb9a1+CY4PJLSCdAWRRW1sdPQvX40 lCy7Qrn3RXdwz7O4SwlSuGbBKpxlIR9Yw0ogMjtxO5cZ/UhwAaY9Zbl6E g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4348210" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4348210" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 06:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046241" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046241" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 06:36:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 17877697; Thu, 7 Mar 2024 16:36:46 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Andy Shevchenko Subject: [PATCH v1 3/5] w1: gpio: Use sizeof(*pointer) instead of sizeof(type) Date: Thu, 7 Mar 2024 16:35:49 +0200 Message-ID: <20240307143644.3787260-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> References: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" It is preferred to use sizeof(*pointer) instead of sizeof(type). The type of the variable can change and one needs not change the former (unlike the latter). No functional change intended. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-K=C3=B6nig --- drivers/w1/masters/w1-gpio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index a5ac34b32f54..3881f2eaed2f 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -85,8 +85,7 @@ static int w1_gpio_probe(struct platform_device *pdev) if (device_property_present(dev, "linux,open-drain")) gflags =3D GPIOD_OUT_LOW; =20 - master =3D devm_kzalloc(dev, sizeof(struct w1_bus_master), - GFP_KERNEL); + master =3D devm_kzalloc(dev, sizeof(*master), GFP_KERNEL); if (!master) return -ENOMEM; =20 --=20 2.43.0.rc1.1.gbec44491f096 From nobody Fri Dec 19 04:18:28 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 4E62012C7F5 for ; Thu, 7 Mar 2024 14:36:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822212; cv=none; b=jiZe3Rvpngh+QBIF6ZxYUvRVqjsgpAS8oozIj6/FfPNKCH+M5TDafWkwdMNFVMYXn7jMEQMSPrMLukb0LiEyjamtEw962VsOTWSzgwqoBebt5obIV0EKlsssEY4EkXwXCEKst7esqZcU5T0mj+5ki/9si+X9ZfvLtEPK5UORyYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822212; c=relaxed/simple; bh=++4aIXY+dzGT+hv5axuOYMIB1kIX/RNjVM6yezNWmhI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gMbfnQeIhDSOQ64i3PRakGsPMhsfMHkbwoyhVsdJXkrIYAoHRKceEJlx1Kwz5lR3zlx309PAtV7zoL8os7Pt2wygnpBZgFGvNfsLUjEeQI81kLzuV0Ci9i3/ibL78eifhpawsHyF96Q9RbBxWOz73G73eD/6SDV2OjImWJvSYqo= 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=lAu+gyf0; arc=none smtp.client-ip=192.198.163.19 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lAu+gyf0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709822211; x=1741358211; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=++4aIXY+dzGT+hv5axuOYMIB1kIX/RNjVM6yezNWmhI=; b=lAu+gyf07RZDEJ6kNbyXaXrE+fojJXl3UDA0n7cp3GrWo+pkJDb2q8Ng KlB52dVQSwtiXlXibGH0xShvbNGKQ1GVWLgHmZ8yKHqXF7mQiTRn6YNjQ S/S2pc037WO+YFDFHHKObTTv4Q0RCDO5AYEEW63Nx+UX0qidKMtcExEoh lJLY6M2A5qVrd6k+yigWQIYiATw8iPDzvgkxLevgGW2j4xgdIZptgFh8u BLzVMNOie7t0jljlYvk6jFLcaaxiyFoe/ryN7n4BJ7bbxF824QlIcSW9s yPEpicXSj3MnezvnL2C8k9wUgxo29IWY4YxzlVGdeuzQoa/y+8XSb/1Ea g==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4348213" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4348213" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 06:36:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046243" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046243" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 06:36:47 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 213A75BB; Thu, 7 Mar 2024 16:36:46 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Andy Shevchenko Subject: [PATCH v1 4/5] w1: gpio: Remove duplicate NULL checks Date: Thu, 7 Mar 2024 16:35:50 +0200 Message-ID: <20240307143644.3787260-5-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> References: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" gpiod_set_value() is NULL-aware, no need to check that in the caller. Signed-off-by: Andy Shevchenko Acked-by: Uwe Kleine-K=C3=B6nig --- drivers/w1/masters/w1-gpio.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 3881f2eaed2f..8fd9fedd8c56 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -117,8 +117,7 @@ static int w1_gpio_probe(struct platform_device *pdev) if (err) return dev_err_probe(dev, err, "w1_add_master device failed\n"); =20 - if (ddata->pullup_gpiod) - gpiod_set_value(ddata->pullup_gpiod, 1); + gpiod_set_value(ddata->pullup_gpiod, 1); =20 platform_set_drvdata(pdev, master); =20 @@ -130,8 +129,7 @@ static void w1_gpio_remove(struct platform_device *pdev) struct w1_bus_master *master =3D platform_get_drvdata(pdev); struct w1_gpio_ddata *ddata =3D master->data; =20 - if (ddata->pullup_gpiod) - gpiod_set_value(ddata->pullup_gpiod, 0); + gpiod_set_value(ddata->pullup_gpiod, 0); =20 w1_remove_master_device(master); } --=20 2.43.0.rc1.1.gbec44491f096 From nobody Fri Dec 19 04:18:28 2025 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 56D6C12E1D1 for ; Thu, 7 Mar 2024 14:36:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; cv=none; b=ZWQsGs0s3ddOLB7Lza3jifip8sWYktrhbtiFe0k3e/bZH9P4m/B8R2C4QU1+Y+5ibLQMdAUOAJUdR2J/2rc4SbEBLlKGQPv5QqJVjopdF6Pp9tIiC+Zeyv2+4ZRR/1dcofTXZ6HK73dFQbN3NS3gKX6znpnfq34Ctsz7pQ6T6YY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709822214; c=relaxed/simple; bh=SpbU5y5jpGRsktvmR80O+qDRedvzwa1iegimEO+Vkgc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t1rwrM2VSMEPvWcX5FKp2w5IovZCirtwXkxNTBNsaPKb3SP/GaZ4k/Z3n9kdyxkamaJlqFTgz9fzgvkIZW/DeKjWKOdPEl1vQi8tTqwJGfHr77/mFu0nm5jLZbqTNIqlJ5IIN+IijPbA2QdK0tlxxRrROmGZ8XBJmT3EiJj3nfk= 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=brYIkjx0; arc=none smtp.client-ip=192.198.163.19 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="brYIkjx0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709822213; x=1741358213; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SpbU5y5jpGRsktvmR80O+qDRedvzwa1iegimEO+Vkgc=; b=brYIkjx0+HGXBdkbZHRcIxrvMta8Odti92TCalZ6V9m7qdm4O6jio/4S 2sQSFWqAEBO09637Sb9jzkuIEV2PiDWAwbnRl2HX9FNalkoXFtJetKoOF txo2OM23O2DuzimRFSALxRwfQoHVvj+uTVWVLKXf2a71ysydw6gDde6bQ 2XiWAtpBkJAKk0SHLsogKlESUNhcGJMKOZmdQOAKb93fYtfRuqNhR03vz GVXn4hBSVuiDDTjvV8dkLAn21TeUh221+8e+gFtT7bazfMxgBgZkDWIvO mJS/s8ARTMfHgcJthm0w9P6HHiYFGNvL+z2r2JnHnVj6Q3Gfei9olX8GQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="4348220" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="4348220" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Mar 2024 06:36:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11006"; a="937046244" X-IronPort-AV: E=Sophos;i="6.07,211,1708416000"; d="scan'208";a="937046244" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 07 Mar 2024 06:36:49 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2FE3374C; Thu, 7 Mar 2024 16:36:46 +0200 (EET) From: Andy Shevchenko To: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Andy Shevchenko Subject: [PATCH v1 5/5] w1: gpio: Don't use "proxy" headers Date: Thu, 7 Mar 2024 16:35:51 +0200 Message-ID: <20240307143644.3787260-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.43.0.rc1.1.gbec44491f096 In-Reply-To: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> References: <20240307143644.3787260-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update header inclusions to follow IWYU (Include What You Use) principle. Signed-off-by: Andy Shevchenko --- drivers/w1/masters/w1-gpio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/w1/masters/w1-gpio.c b/drivers/w1/masters/w1-gpio.c index 8fd9fedd8c56..a39fa8bf866a 100644 --- a/drivers/w1/masters/w1-gpio.c +++ b/drivers/w1/masters/w1-gpio.c @@ -5,15 +5,15 @@ * Copyright (C) 2007 Ville Syrjala */ =20 -#include +#include +#include +#include +#include #include #include #include #include -#include -#include -#include -#include +#include =20 #include =20 --=20 2.43.0.rc1.1.gbec44491f096