Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5901423rdb; Thu, 14 Dec 2023 03:03:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7JnKo3bVwofztTtNZNF3KbO40GW0zjQj9z8tzdSx050Zbq2CWUh9Tq8yfqvPUbEI0Zhxe X-Received: by 2002:a05:6358:78e:b0:170:9dd0:760e with SMTP id n14-20020a056358078e00b001709dd0760emr10030951rwj.63.1702551796697; Thu, 14 Dec 2023 03:03:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702551796; cv=none; d=google.com; s=arc-20160816; b=BAoMgOxGucZn98Zz2+HuYDa5j5cmqjG/RLtLwNlt3JWvBimPh6wY3KLfmy/S0hHb+z 4dOJIhDMG/sy/Qujr+9OoiFobU+1iiW7XYtiSvLx00kSOJ/Jxi0bEIqbXanjDlpCWeub etotFp+QMkKaVkUFZhGn02ZzswnBwKDKDMRbx64gRs8Wqjh3FXe3VxDCnFy1RPSSVFha 1t5223QLOwqH6MVitWnRi11dkIgYurOLhNshYSAiBkWYSq2TkSRjOT7l1KIYsM5LE3AH zW6uDGHYx8khQ9AKHwKciNzixoOZNmLTrLtn4iW6P+E3BYBSlTh106ezsOFQiBfjuEth t6BQ== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=wu2c3DwVvYEQBllF+/J+S28oH/5LztrNNWHtWraW0sc=; fh=BGWPup9pQEPuzc7wRpj8/AOlqamPTM7v3TjTez+c4LM=; b=RRpWyjMZ0i7lnrMjcM538MpoGZ71PtmagtTf22q/nkQyGDzsmArnC05dR9Q1YrBJMN H0h2s9LIgSSJvXnp2rWEXSUoYxeYUrDyX/TIvBfBOi18PsjmsoQCL+9Pz1RXi5c+KeBx ulLepyCVlYj4jWClk/u+cdkOlCYFg1lt4ZwBSvDxfErPyMioK8tXvBFjg6fKPgYnM1FW I9O4bEpzDMxbBj46kBrpjWJO3OS/e0O9Qgm/ilswXMlrspgvdw35+4TRL0JR9ZcZFDF0 70mtISlYEr0tF6wD//rfXCkRsM/HY1EmDwkWwOx7ICAuHx6Z+jqt01XkHYm0g30KCW6k t2AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="UeNfZ/sj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s18-20020a656452000000b0057884435a71si10570163pgv.396.2023.12.14.03.03.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:03:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="UeNfZ/sj"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 059A681FEC74; Thu, 14 Dec 2023 03:03:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443837AbjLNLC6 (ORCPT + 99 others); Thu, 14 Dec 2023 06:02:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443832AbjLNLC5 (ORCPT ); Thu, 14 Dec 2023 06:02:57 -0500 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD10F11B; Thu, 14 Dec 2023 03:03:03 -0800 (PST) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50bfa5a6cffso9287074e87.0; Thu, 14 Dec 2023 03:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702551782; x=1703156582; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wu2c3DwVvYEQBllF+/J+S28oH/5LztrNNWHtWraW0sc=; b=UeNfZ/sjAcHJwE47q13oEhNa/P1qRCcN5zfyQMKC6CQV3p8qL5aDiaLeWywD7vB5Bv n5W+at9asoyRx0ncRDqrNvAkotWsvks9N6ETxWiyMZMr5RKiaH4KZi5WAAKkhdGXTT9J tML7SDpaCgYD+y7qVP0+eU65tHVj1BqbDDldyxqAcQTW1ECshRAbTzw3+rpdB5o3IQlT lI09BzNezUDvC4bTTbGMsOVkWxy2HWDs9nBpLbzAwHnYkjAoJajFB6+KQs41JRvrQYT8 f/SMWM0RIFk2Yy8zvydFWARD0T3EoKA/hLtW1SqmHOicAJAmppbwKykC2ao0Cowcp/5K NA4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702551782; x=1703156582; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wu2c3DwVvYEQBllF+/J+S28oH/5LztrNNWHtWraW0sc=; b=pukQQBoUdarLuqRiLUXlskQ63rls/As9kkhHA5YK9bKRHlO5vbbUD6TRKwy37j//5R N2iTWqeb785le7WHdJY8wrKKr4vrEW/RqD29Nb5sGY4G13FKi1OlwtxJ7AqWlmo+42Db NiwM+tjLEpQDOPEFZnjjcmtkS4cHRo1AUn+oujto2fbbHEhvEK7QgUIprXpuUe7G7ywX oVgF2ItOOPTwUsa0KIkdN5pr5ieNdw9R3/3REfd5T+6a8Vv2JxszjVaS97RTbkqAsrrH XM0yRHj9eAMCtTmykXWfAJOKqCQHiKNLMi7Psu8b1DnwKFaFG5bRJCrBP3pz+JRptm7r 02NA== X-Gm-Message-State: AOJu0YxmBOqD8lhsab7i0/HGNBAGu/iAffcpN3ccKjgFEXM2XwaOMHxM mDtn7fqrqWt5A/ImPn07ynU= X-Received: by 2002:a05:6512:11c2:b0:50b:e790:e96c with SMTP id h2-20020a05651211c200b0050be790e96cmr3522017lfr.30.1702551781616; Thu, 14 Dec 2023 03:03:01 -0800 (PST) Received: from [172.25.98.130] ([5.2.194.157]) by smtp.gmail.com with ESMTPSA id vc11-20020a170907d08b00b00a1b6d503e7esm9152162ejc.157.2023.12.14.03.03.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Dec 2023 03:03:01 -0800 (PST) Message-ID: Date: Thu, 14 Dec 2023 13:02:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 2/2] iio: adc: ad7173: add AD7173 driver To: Andy Shevchenko Cc: linus.walleij@linaro.org, brgl@bgdev.pl, linux-gpio@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Michael Walle , Arnd Bergmann , ChiaEn Wu , Niklas Schnelle , =?UTF-8?Q?Leonard_G=C3=B6hrs?= , Mike Looijmans , Haibo Chen , Hugo Villeneuve , Ceclan Dumitru , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231212104451.22522-1-mitrutzceclan@gmail.com> <20231212104451.22522-2-mitrutzceclan@gmail.com> Content-Language: en-US From: Ceclan Dumitru In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:03:14 -0800 (PST) On 12/13/23 16:24, Andy Shevchenko wrote: > On Tue, Dec 12, 2023 at 12:44:36PM +0200, Dumitru Ceclan wrote: > ... > >> + if (chan->type == IIO_TEMP) { >> + temp = ((u32)AD7173_VOLTAGE_INT_REF_uV) * MILLI; > > Hmm... Is the casting mandatory here? > Yep, not really needed as MILLI is already declared as unsigned and it will promote the _INT_REF as well. On signed32 it would have overflowed. Are there any cases where this would not be alright?