Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6483324rwb; Wed, 18 Jan 2023 05:53:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXtvG/jz+Y78b1YtUJJ0stDH5YP7wlgMTa8lap2N6W87TIecT+KPy9wGD0xSZ/FwY5Jt7URE X-Received: by 2002:a05:6402:b:b0:496:f517:d30d with SMTP id d11-20020a056402000b00b00496f517d30dmr7379646edu.38.1674050014288; Wed, 18 Jan 2023 05:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674050014; cv=none; d=google.com; s=arc-20160816; b=XawcHwLAgJ9KUFPDZbJbnb9fEI97saYKXqC2Y+Lwrgya5R343GJjX8liCuBj1HDkFM +/CWWA5lMvAv2ZK8orMcktTb561eI29DfWuHV3Dmf4ep2AISsAnBa60ZgVK8PYMqK9Ec c+uQPeXg778sEZmLx6HrJphRt6GJQyJlj2CgDDa8PSi/4npbpeHIobGdCKxzNvVkgOcR rWPB4pXBf0MDV9EDFHTOKeff21kM9QXLXon+j+AuiaqSn8qqVSFFSggOmZ5GHhgzPvEV RQP2LQwMgdX3YQPe+xEXQS1OZ1QT1f+KhhtsSeJDtGnFjjj53yR4SShujKd8XIJaw1xs TiiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=y3f6LY4L/lLnz5JjIGjIGZChBIxAYM9KExA0bJx6y18=; b=Vy7qNhOwAaNI4cbIW1A34iH7LGa2riH3s5B0DzlZ5VMiZ7L38ik97cgCM/Ewmu0PTA 8zJEKbnt9kGxBI8tEIS8b/8P94xBSHqPy8rBApOy5sbOC9J7xHbfPsFIpoLmTW6/csu9 FDp/nfftxTyKzZf3KdcTJazYAjZod9l+dXH5zBFvk2NdjNvhB7/dadRl5/g6v9G90iF/ 1nConOLnhJQgB3OhD+cfklRX1QOdCLgzcsSWjcir1jRqO8nAgUhuOsuZupt5AoqTyPQD 83qr41+byYT/PUDbBQiTsV+ajMaE4gJKliujw0ONpyrRz50k9gDAXr+8PgMxiEXr27W7 LQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="eV9a7C/D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t22-20020a508d56000000b004614f376c2fsi12954288edt.88.2023.01.18.05.53.22; Wed, 18 Jan 2023 05:53:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="eV9a7C/D"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbjARNZq (ORCPT + 45 others); Wed, 18 Jan 2023 08:25:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbjARNYK (ORCPT ); Wed, 18 Jan 2023 08:24:10 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A161E1F7; Wed, 18 Jan 2023 04:51:37 -0800 (PST) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id DBCD46602DFF; Wed, 18 Jan 2023 12:51:35 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1674046296; bh=lRImklMheY/mkerDhgF3t+gOPWvx98JSfHVl/z55Mwg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=eV9a7C/DAkgpHzFu+lxyYL9ggSGKrRwZI+eY2S0maBO7wTwByBqCpS52K8nbm3Pj0 JkRVQzRW5k8xNiffu4Rrw8MEL2T+1Uud/zsmyVcI1+vaDCMnsJcVi1zk2INR1XH+YD bVW5JZYgehWiVirH7/uiIyIon/rMRkBK/PqOVybCRoE/RPB07kVbzSwV+/XAf1M6FH LqKnApM5JEFyTHxIParFd1sGZIQxgkDvocRx6ENY57BlEdkZ3t8KpUADULE7X4Uv0Y EslnVXL/SHC6sVwi36ridWXDoDXYGpqigm+g57dp7XCQHZUdW+5oxzjb3T8/v8gMsp YfEiNh4sx8laA== Message-ID: <0488e63a-aa81-08ea-4b32-2bb608c957ea@collabora.com> Date: Wed, 18 Jan 2023 13:51:32 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v4 1/2] thermal: mediatek: use function pointer for raw_to_mcelsius Content-Language: en-US To: Daniel Golle , linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , Matthias Brugger , Rob Herring Cc: Steven Liu , Henry Yen , Chad Monroe , John Crispin , Frank Wunderlich References: <69c17529e8418da3eec703dde31e1b01e5b0f7e8.1674012985.git.daniel@makrotopia.org> From: AngeloGioacchino Del Regno In-Reply-To: <69c17529e8418da3eec703dde31e1b01e5b0f7e8.1674012985.git.daniel@makrotopia.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il 18/01/23 04:55, Daniel Golle ha scritto: > Instead of having if-else logic selecting either raw_to_mcelsius_v1 or > raw_to_mcelsius_v2 in mtk_thermal_bank_temperature introduce a function > pointer raw_to_mcelsius to struct mtk_thermal which is initialized in the > probe function. > > Signed-off-by: Daniel Golle Reviewed-by: AngeloGioacchino Del Regno