Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp352315rdb; Thu, 21 Dec 2023 10:57:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqaqBnXXZfwTndF9ubNFViFPQmUOtQ3d+Q/VbSrl5dXX1BOSPE6Cqor7cnNaZ0OoZ5Hflk X-Received: by 2002:a05:6a20:8e15:b0:190:8c90:c310 with SMTP id y21-20020a056a208e1500b001908c90c310mr145778pzj.42.1703185045918; Thu, 21 Dec 2023 10:57:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703185045; cv=none; d=google.com; s=arc-20160816; b=BDl02Cw3cEs7bEq3gQxt6L57LEJYkGcsOzkmaWpMwaIh6zWixIqlQxFSHQkfQApTwi AHhW2r6q0k2YyyBjHtLaSkCi22PHQ/9IW2Vo3lS6607ZW+V3Cxtgg1asQOwsejRF3Y6r HlD+xyS1InZn3YSfuLQBhG/uOq/jciet3GLKOzXVaejl2i6M+CU9cmmjdqzA+hlwnLUI CeU2z5lsXPGs1B6NZ7PfCEww+dgDM4Or5da/fC5qymvAltFtdxsOPXYbj/9kYKxjQA9R GroS75ayP7nwhkOmcF0Lu9X1tlq04tw3szvD7A09l+Bt8SPynScQZAmtdq7gw1oQF69G v9ew== ARC-Message-Signature: i=1; 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=1ez827Nwv0PCJp7yHRGpscI+PcE4XwM2uw7IbXMXl5M=; fh=LDeSIqQz8HQz8K3l8D8oqo08f1EvvKxwIxWxelj4uLA=; b=KQxhK7JdF9ujuSO8c9cKliKNnCt62KrNTt3n0Wz9MJl9b8uItPY2v6M0uCbJv8xf87 fNpS5kTjWCzPDfdYez7Hwknp16go24RdaNtWmoGpDyRLsjqELV9wk7mg4xaErIdkQO9E jPedXpgT1N8BUJuxF3URg4o0h1D5BATmXINk3PSCoOhZ8pLxUkN2qAZJZdhOE/KFy3Nk NVtnXuytqPTo95Tf8EA+nZ3iwpK0PxDA6eojTRaWxJXHMixm8DshXaK1dk9c6WTF6Vrg u5S8DKEjTLYu2ql3JPDi3499aDjFsXFcGhUN7+w+HcspSe5qJse/275n6GKWn9hQqqt5 Qt+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=qvgKvBWV; spf=pass (google.com: domain of linux-kernel+bounces-8962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8962-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id p56-20020a056a0026f800b0069109ee0b59si1910473pfw.231.2023.12.21.10.57.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 10:57:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=qvgKvBWV; spf=pass (google.com: domain of linux-kernel+bounces-8962-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8962-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8299428577F for ; Thu, 21 Dec 2023 18:57:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 635046519E; Thu, 21 Dec 2023 18:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="qvgKvBWV" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 486FD64AA0 for ; Thu, 21 Dec 2023 18:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-40c256ffdbcso12446345e9.2 for ; Thu, 21 Dec 2023 10:57:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1703185034; x=1703789834; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1ez827Nwv0PCJp7yHRGpscI+PcE4XwM2uw7IbXMXl5M=; b=qvgKvBWVreZP4ptG+yOSgyuE1TFvcA+YCN4BTK5biADBd6x6p56gUp92DKl3UlzfmW J618miRJe6oxxdS9iUGgDJ6PnSjJ2wI5nDsqtD7Yuk4VyAAY5pG4pmPBhNbKdwGCx7Vg j4smXPG8+YZffONKuiAlNUFBYfMAiRk+rtlD8R4kckrOv7t/g76kTmEJLw0uF14cqDFq OA37br+y/NaeAqUwf69oTmB584yB0mY8hzLaYCOteQoAFKzV5/G7V+ESJQHvyBYK2W4p TZ/Ht9hkZ5haEOn+AB2JabYtO/UJiqJwSohaeUKtlPPSr7+qcDD8DWqofjoNwP8LDRVL E7UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703185034; x=1703789834; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1ez827Nwv0PCJp7yHRGpscI+PcE4XwM2uw7IbXMXl5M=; b=xQTBaBgsame2SNhAiwoGYzErIcEjItJ/CY/h0/9w5i9vz+3hMzliCVhzTjMiHOlMPX ldNtBGkBNPVlI+96XC+/Lm+FDMOmJJUCwGslb2dKQZqlKthwKjtAFm3jmsxDxK8e4Fab NjRI+ny7PQrBiXcc75QxVM/Xs3L8O2hZhudm9Ug7K0kNzN5vWHeFdvufj+v6sJMBggZD xMuBbIDTMuXQkQstwIudxYJF41XsEPaIg2nWpt2QJZUits2w3RTCrl61/GVNqQO4bt3w PDy2R6ObpsNvrKuN/rePevUqQ8fnsy8mEnsxl+NGpqpP//O//g3fAiVu5+gaSjwe1r2v fKVA== X-Gm-Message-State: AOJu0YwiZxKAT6jxkR/qb0U2ovgd7nBgulR3nltV5AKtAaMX/uMbNk7S Mr2pkHbRPCSGDj23o8Sl1vWDUGkGqUswGw== X-Received: by 2002:a05:600c:a42:b0:40c:3905:51e4 with SMTP id c2-20020a05600c0a4200b0040c390551e4mr101519wmq.68.1703185034624; Thu, 21 Dec 2023 10:57:14 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:7701:a2c3:cba4:74db]) by smtp.gmail.com with ESMTPSA id u4-20020a05600c138400b0040c03c3289bsm4277125wmf.37.2023.12.21.10.57.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 10:57:14 -0800 (PST) From: Bartosz Golaszewski To: Tony Lindgren , Linus Walleij , Andy Shevchenko Cc: linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] gpio: tps65219: don't use CONFIG_DEBUG_GPIO Date: Thu, 21 Dec 2023 19:57:02 +0100 Message-Id: <20231221185702.24685-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bartosz Golaszewski CONFIG_DEBUG_GPIO should only be used to enable debug log messages and for core GPIOLIB debugging. Don't use it to control the execution of potentially buggy code. Just put it under an always-false #if. Signed-off-by: Bartosz Golaszewski --- drivers/gpio/gpio-tps65219.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpio/gpio-tps65219.c b/drivers/gpio/gpio-tps65219.c index 7b38aa360112..cd1f17041f8c 100644 --- a/drivers/gpio/gpio-tps65219.c +++ b/drivers/gpio/gpio-tps65219.c @@ -96,16 +96,16 @@ static int tps65219_gpio_change_direction(struct gpio_chip *gc, unsigned int off * Below can be used for test purpose only. */ - if (IS_ENABLED(CONFIG_DEBUG_GPIO)) { - int ret = regmap_update_bits(gpio->tps->regmap, TPS65219_REG_MFP_1_CONFIG, - TPS65219_GPIO0_DIR_MASK, direction); - if (ret) { - dev_err(dev, - "GPIO DEBUG enabled: Fail to change direction to %u for GPIO%d.\n", - direction, offset); - return ret; - } +#if 0 + int ret = regmap_update_bits(gpio->tps->regmap, TPS65219_REG_MFP_1_CONFIG, + TPS65219_GPIO0_DIR_MASK, direction); + if (ret) { + dev_err(dev, + "GPIO DEBUG enabled: Fail to change direction to %u for GPIO%d.\n", + direction, offset); + return ret; } +#endif dev_err(dev, "GPIO%d direction set by NVM, change to %u failed, not allowed by specification\n", -- 2.40.1