Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A3B5C64ED9 for ; Sun, 19 Feb 2023 14:56:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230370AbjBSO4o (ORCPT ); Sun, 19 Feb 2023 09:56:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230167AbjBSO4k (ORCPT ); Sun, 19 Feb 2023 09:56:40 -0500 Received: from mail-il1-x12d.google.com (mail-il1-x12d.google.com [IPv6:2607:f8b0:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36209F76D; Sun, 19 Feb 2023 06:56:39 -0800 (PST) Received: by mail-il1-x12d.google.com with SMTP id m18so171164ild.0; Sun, 19 Feb 2023 06:56:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=MRWzUiIkZMN/8VwTf3/WG02TOz303pOTBThE0ISU9KA=; b=OBp/XQAU5Q471JJAcxBMgqa6dD4Dp32mVwrDrvC1tRuFffnp8TdtHAw/E8heX1RCnn mZ0zJ/aWl+G8TXYcKZuS0Gx/77yQV9MyRVZhYGfgTIwQgi1f+S7jIWw21vvn+0IyeUFX rdGxpxTfynV5AOlzLbnmYCLi82W9sEgiqT7rTWjNkuCAl/kE3OPW30GwGFZqwI+/03tU y7wSgIhnwQY0CXiY+UKDIT1n/bfXzXdmCFVT9lWQ/dd9grtj5iw3PduSsmfni1mS1tZT HOvxd60YwrOlZZkXi8ODkZ40ZdpjvMDWGoKx4Vf2pWX9kbUlwTVQq817YlKAqQz5NLhr k9lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MRWzUiIkZMN/8VwTf3/WG02TOz303pOTBThE0ISU9KA=; b=Ci9KNzXAogrq//Vt2pV0W+82Jpia76RWoz8/mqoW+83ArD8ALdbrglpsSsBlKZttFh OFh/IXCf6vWNo1Pcvf1OBSni+9GA7QCt9fZVIg877d2RsSEVSwWQojhOlOSRaPttZFo9 xu5g/0TSmJtXYwI+MNyw93tZYNOd8wWizGVFZidUW0UuVc3LTL4WK8Z/1ASN3bF3VJry 05uoQ/GBSTmY9n/uEOQsjoUCLSZJydfu2+rX/lbYw3T1gWI+3ieCnlHSJq51XfYxMRgN jKPclnFqd9Wd9UrcTRjqwouZfoHf8E10ckvNguIMjCNNck6w6p4YNNHrHIXZQJLk/Gac QVCA== X-Gm-Message-State: AO0yUKXUYtKQ89j9zLM6G16yViPSJXc3Fp02SvBglZloG3z9tAqckvDV sJhDicJXDGAFKRi2ZiG12ag= X-Google-Smtp-Source: AK7set/tBdHvgZ9GFY6tgVICfvLzFe6RtqLrm+n2c8aFQ5ip61CmdhaCQUFruBwYDgn3guOUu59kmw== X-Received: by 2002:a92:1a41:0:b0:315:4350:9c09 with SMTP id z1-20020a921a41000000b0031543509c09mr1511617ill.16.1676818598543; Sun, 19 Feb 2023 06:56:38 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id c8-20020a92cf08000000b003153cdd03a3sm501663ilo.61.2023.02.19.06.56.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 06:56:38 -0800 (PST) Sender: Guenter Roeck Date: Sun, 19 Feb 2023 06:56:36 -0800 From: Guenter Roeck To: Daniel Lezcano Cc: rafael@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Rui , Len Brown , Damien Le Moal , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Jean Delvare , Jonathan Cameron , Lars-Peter Clausen , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Dmitry Torokhov , Raju Rangoju , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Ido Schimmel , Petr Machata , Gregory Greenman , Kalle Valo , Sebastian Reichel , Liam Girdwood , Mark Brown , Miquel Raynal , Amit Kucheria , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Markus Mayer , Support Opensource , Andy Gross , Bjorn Andersson , Konrad Dybcio , Thara Gopinath , Niklas =?iso-8859-1?Q?S=F6derlund?= , Heiko Stuebner , Bartlomiej Zolnierkiewicz , Krzysztof Kozlowski , Alim Akhtar , Orson Zhai , Baolin Wang , Chunyan Zhang , Vasily Khoruzhick , Yangtao Li , Thierry Reding , Jonathan Hunter , Talel Shenhar , Eduardo Valentin , Keerthy , Kunihiko Hayashi , Masami Hiramatsu , Matthias Brugger , AngeloGioacchino Del Regno , Stefan Wahren , Neil Armstrong , ye xingchen , Zheng Yongjun , Tim Zimmermann , Yang Li , Srinivas Pandruvada , Ricardo Neri , Jiang Jian , Daniel Golle , Balsam CHIHI , Randy Dunlap , Mikko Perttunen , "open list:ACPI THERMAL DRIVER" , "open list:LIBATA SUBSYSTEM (Serial and Parallel ATA drivers)" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "open list:HARDWARE MONITORING" , "open list:IIO SUBSYSTEM AND DRIVERS" , "open list:ARM/Allwinner sunXi SoC support" , "open list:INPUT (KEYBOARD, MOUSE, JOYSTICK, TOUCHSCREEN)..." , "open list:CXGB4 ETHERNET DRIVER (CXGB4)" , "open list:INTEL WIRELESS WIFI LINK (iwlwifi)" , "moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE" , "open list:ARM/QUALCOMM SUPPORT" , "open list:RENESAS R-CAR THERMAL DRIVERS" , "open list:ARM/Rockchip SoC support" , "open list:SAMSUNG THERMAL DRIVER" , "open list:TEGRA ARCHITECTURE SUPPORT" , "open list:TI BANDGAP AND THERMAL DRIVER" , "moderated list:ARM/Mediatek SoC support" Subject: Re: [PATCH v1 01/17] thermal/core: Add a thermal zone 'devdata' accessor Message-ID: <20230219145636.GB4084160@roeck-us.net> References: <20230219143657.241542-1-daniel.lezcano@linaro.org> <20230219143657.241542-2-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230219143657.241542-2-daniel.lezcano@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 19, 2023 at 03:36:41PM +0100, Daniel Lezcano wrote: > The thermal zone device structure is exposed to the different drivers > and obviously they access the internals while that should be > restricted to the core thermal code. > > In order to self-encapsulate the thermal core code, we need to prevent > the drivers accessing directly the thermal zone structure and provide > accessor functions to deal with. > > Provide an accessor to the 'devdata' structure and make use of it in > the different drivers. > > No functional changes intended. > > Signed-off-by: Daniel Lezcano > --- ... > drivers/hwmon/hwmon.c | 4 ++-- > drivers/hwmon/pmbus/pmbus_core.c | 2 +- > drivers/hwmon/scmi-hwmon.c | 2 +- > drivers/hwmon/scpi-hwmon.c | 2 +- For hwmon: Acked-by: Guenter Roeck Guenter