Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1899016rdb; Wed, 31 Jan 2024 12:32:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlJ9bjK43xwNA3m0SFT/+cZ/byStf2/S7SrjUFG7O4ueR7E3SvMGSCCGOd5raCphDteF7X X-Received: by 2002:a17:903:192:b0:1d8:d046:1ec1 with SMTP id z18-20020a170903019200b001d8d0461ec1mr3388839plg.52.1706733131487; Wed, 31 Jan 2024 12:32:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706733131; cv=pass; d=google.com; s=arc-20160816; b=mZmn804OZLrp2RwT6MbIBf2txl0Y6ETRG7Kalhgu1Fc9/dMHpLRV3pVtDxJDyhH7x+ hGRRrxmfj1w6T1vtlK2UphspZ3yIkOmkM7LYV/IeMsg/z2xkmgjioo3np0dkb7ZN0FQ3 DmfCurqpJPaKTYbQ5pQ5IC3V0J98tWGCgGjCon30BnE44UJM1cp+3jQbBc+LvkEBpPX0 4U15wGTb5GuiG3vFhY5xei7aY0kXTKvvTCxYxfSj0px9P9EKc9z/vE6i10ho2S5swbAZ wd6SIsg7FB4O8v4QT+erGKqEgxljo/xGLnYuMVAfeSXFJ9KPXUgtgZHl0T0TstGad48y K83g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=3DAPucK5dhach6L0eLI+iOwT6ZlBNhOh/iA3XI32BL8=; fh=n+D4qU2kFqCyYNAu3+X9IWXVaiKtJHsgni6TP3VCg2s=; b=tiT/X/ErnQefFHfzV2wvYRvAaF81A4CFt5QjzQl3BFKgejNtdXgYOv8SDpnWKjz9Es Lz0UsFdXxRGIQJ/vIec+nOQlqFvZMhPRp4Pfa1Yzb2mDYLSjO7/sFAwhubn/kwzBy0Wp JbY3dx2voy7cd6HBga+5WZ5n/6/J/nEBMXwcoz09czpIfG0kNXbeQ4rS+Y9v/i6Q5QCO YdILeUeAml38ls5SpfZj5oxaBIHWuk4JdehY5wO61VGl5z0lnB1LqmxMoYoVgAIaXrge smylbP2HHvzI16waTARUGFwzrwYLWZZpB9zWO8393yQj1OoHFji0A8I5NfTlApSc9DB3 3TzQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tQMzKF8n; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47084-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47084-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=1; AJvYcCWgvKgOPpJVPX5Mx2nDejeuCKcME3Nv6rLzfC1UTiCRzTjSURJZNn6GcopQGLbuclIBjzrMOXl6/WavBBBSj/VPj05MtgDMQXnaYn0yAQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g3-20020a1709026b4300b001d7852b689csi10052334plt.461.2024.01.31.12.32.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 12:32:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47084-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tQMzKF8n; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-47084-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47084-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 2ABBC28C754 for ; Wed, 31 Jan 2024 20:32:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 71499405EB; Wed, 31 Jan 2024 20:29:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tQMzKF8n" Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) (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 101BA3FB2C for ; Wed, 31 Jan 2024 20:29:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732977; cv=none; b=EY5ca/4M0gzuvqeIsWfGeZhGhNUJATbcnbMT6CR2OC9mN2H20SLke+H+hZR57gLnrIrsf34vmi5Uq9sR09rdui9In6kJeSwsbywgARePI4YiZ/Q79wf2xTnYDPjA9nxYh8DI7DGBtWIcT7j1yrxGizdhmdEPIONtb7uh8NpHJIQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706732977; c=relaxed/simple; bh=vXMGrp/FQqOSxGCHd4cBcVgOaMZOyiPxnaIDfniJcFE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=FBeHPswBuIDCH6eXJddQnEhkyZX0CX3aKn7pAY/CWEc1usZvnKutwOjnwDz1CWq+njulkMu0ipCbzDt9Vgv0CaJYehdLj3Mx7DBNIzqn6AqcQy1pMJKfctwAL6GGj8XgDhYQZRXUlntBOQcIl3kmd+NNlGaQ5mSym0Bewka5tcQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tQMzKF8n; arc=none smtp.client-ip=209.85.219.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-dc6782e92c2so108040276.3 for ; Wed, 31 Jan 2024 12:29:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706732974; x=1707337774; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=3DAPucK5dhach6L0eLI+iOwT6ZlBNhOh/iA3XI32BL8=; b=tQMzKF8nsDdAtHcnyBLMnq1TUlXVP2LLk44HUWsQrhWpIzBffHuiMWcUVzovZKXH/K sqRAJlpSDZ4LfXa5icmEBdk3671IoCOVTcX2iYxQFdyPqFBJ/aH5X6CIXbMcOIvVGz+N a1AQGEwgQZxySt7qIHRzoiMMIh3Z6lRcMOPqXz+galaHfN7uybijHI+BMki2zMhF9+yd dwta52s9/btZlV+HLeciFOFJOXCyBEU2AojgaRZVVtaOGHGON0w88gtWt30sZcAxFdfO an/r1yV15kCzWoSEGso9MW2ZIRCgXuK3CgN0VgDIO/sQDPFit9wEP75hSMIy3249Cqd/ TB2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706732974; x=1707337774; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3DAPucK5dhach6L0eLI+iOwT6ZlBNhOh/iA3XI32BL8=; b=oaJ/wT7M83pJhHAtyORi29RickSSkMIGDBpP7dVJe10it5FMhSN0iHWsVmyymVi01y oOhBb/hfd5/vdoDTpwf/ipqJZJC6YsXpOczbcxpFbSYclJ2zNdmglO7NhZH57RkNbX0t VDofx/tm7Hbys2IHAnCe/97L2H3VPscEo2bB2bdvw6nVvIJ1p1Cpv+U72pXR5Byqsf/W 2X+Ma/ibXLjGGkrVU5yaWQ5E8xWf7haSJTi95BFYtlmZQTnkHwSP4DcE921Klwvu3t7n hVIb61yy0u9MrCWzIH7E59Iza8cDi2nrzlLmoguYqHb3AANGFm8Cpti+c3mrS46sli0L mgog== X-Gm-Message-State: AOJu0YzQ6GqW6JulYAH7oKRNqSCXsO8krioruuHSlSnqWLBXH49LRSQ+ bFRf0Z9JrFu4+UZfOLCSB25sp3oVd6CyOzhlJVdeTVPLRq51REnKRA5S2dWIN1GsRF/8vhm1JRK s6nN2f412T1jaCeIM9YFwfwKdfpkrKfKZBmjZhQ== X-Received: by 2002:a25:ada1:0:b0:dc2:2d59:512c with SMTP id z33-20020a25ada1000000b00dc22d59512cmr3099744ybi.22.1706732973968; Wed, 31 Jan 2024 12:29:33 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240130124828.14678-1-brgl@bgdev.pl> <20240130124828.14678-23-brgl@bgdev.pl> In-Reply-To: <20240130124828.14678-23-brgl@bgdev.pl> From: Linus Walleij Date: Wed, 31 Jan 2024 21:29:23 +0100 Message-ID: Subject: Re: [PATCH 22/22] gpio: mark unsafe gpio_chip manipulators as deprecated To: Bartosz Golaszewski Cc: Kent Gibson , Alex Elder , Geert Uytterhoeven , "Paul E . McKenney" , Andy Shevchenko , Wolfram Sang , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 30, 2024 at 1:49=E2=80=AFPM Bartosz Golaszewski = wrote: > From: Bartosz Golaszewski > > We still have some functions that return the address of the GPIO chip > associated with the GPIO device. This is dangerous and the users should > find a better solution. Let's add appropriate comments to the kernel > docs. > > Signed-off-by: Bartosz Golaszewski I'm not sure it's very easy to find a better solution for gpiod_to_chip(), but perhaps also add this as a work item to the TODO file? We can certainly try to get rid of before we need to look into fixing this... gpiod_device_get_label() should be easy to fix: linus@lino:~/linux$ git grep gpio_device_get_label drivers/gpio/gpiolib.c: * gpio_device_get_label() - Get the label of this GPIO device drivers/gpio/gpiolib.c:const char *gpio_device_get_label(struct gpio_device *gdev) drivers/gpio/gpiolib.c:EXPORT_SYMBOL(gpio_device_get_label); drivers/pinctrl/core.c: gpio_device_get_label(gd= ev)); include/linux/gpio/driver.h:const char *gpio_device_get_label(struct gpio_device *gdev); We only created that problem for ourselves... It should be removed from . Anyway: Reviewed-by: Linus Walleij Yours, Linus Walleij