Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7991241rdb; Thu, 4 Jan 2024 14:51:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IG75Wp0RVNaA7VjLS+ruz/kt/Bxatsmj5JQ+RuspmdZGIcjIj9a6B4rOXdSnPiZa9o3v9JY X-Received: by 2002:ac2:4185:0:b0:50e:3089:a585 with SMTP id z5-20020ac24185000000b0050e3089a585mr384261lfh.258.1704408663344; Thu, 04 Jan 2024 14:51:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704408663; cv=none; d=google.com; s=arc-20160816; b=0KeJU4Q0Woh+wz3EiBrtOBYU/65MXaZb2y6nTD/561kzZ0szgAmjAr2/mBAAFyF4BM +LmHpD7G6I8vathWS+g0Ev8Kj+OWI6zWNWkurrOFPtcJoK1M718LP7B7Z6rm+TRsqsWl wufFNWDCyfgVJcd0+n3IFamGoBzEmVZWLxDbESnmtZVDOs8Cxh1eZ6tE5YoZ4TcIkuHp AxOydtvuaAUFx3KDtLi5c3/VqpiqQLbiG3NMcYzBWsaKYoFzt8xALC//cJif1JwuGEOe p+l6C1AIPpA946AO1yfL1drZZ1cH5qWX/wZE0n5cRmrBVhYdsf95IAnqoNNlZEJXdivE WARg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=VcPQ9Xa0tJ4XfKkhqDvXF2rtEgjcj5MLQaEjWV4A5Kg=; fh=uzsSMMG0Sh++QBCcoxcAjGcJ2h52mX08SY1lGCUspcw=; b=EIppWrqecUQh9HXsroOP6UvBuQpC2II8h2pYlaQ0htELbS/ru7zsVY7RBedAfu81jA JcWXOMAwWm4fnPsIkEZ3fOmGBkWbascvU2X77zfwtu+y6nSP5eHxqJdyBYT0AhiYHPDF 6gYb6A7apTfWv1XW2gJaPCUhbxY7q49CVyz2PtWJnyFRdT3SaZ+IX1PWdYlYxpbwjBzp BgJwaBwg3MxVY7iN/scEMWoX7oGckSz+5jewvYFBGuCYUECCCrRE0yy+L0u1EduPAyP/ HJFpn4adgSOhqAVVXKjJ2ZzBwjPI/SlHbHU6iG+76EY35POAzQtpb0j9H0cJIXS67WJ3 ECQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wLu6oKyv; spf=pass (google.com: domain of linux-kernel+bounces-17309-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17309-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id rs19-20020a170907037300b00a274f339b7bsi102140ejb.664.2024.01.04.14.51.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 14:51:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17309-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wLu6oKyv; spf=pass (google.com: domain of linux-kernel+bounces-17309-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17309-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 am.mirrors.kernel.org (Postfix) with ESMTPS id DCC6A1F2331C for ; Thu, 4 Jan 2024 22:51:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A47F2D025; Thu, 4 Jan 2024 22:50:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wLu6oKyv" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (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 B4E072CCDC for ; Thu, 4 Jan 2024 22:50:52 +0000 (UTC) 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-wr1-f41.google.com with SMTP id ffacd0b85a97d-3368b9bbeb4so877673f8f.2 for ; Thu, 04 Jan 2024 14:50:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704408651; x=1705013451; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VcPQ9Xa0tJ4XfKkhqDvXF2rtEgjcj5MLQaEjWV4A5Kg=; b=wLu6oKyvqKym5n2thVBOaqmsPYWZRUDg7Ox3RVvC3rROi8bYrh7JNO8kbHacdHswG7 LPp6JiSieyrj2CFNRU5bY5IJvqWGHlalums2crw2rXw20GCtiKdOgyJlSaCc8kWXRPx0 Icah3ubIlmqMjFN1YgPzsKTGZPWp14tud3hzXhwAr3UQlPvcDGWelcKHicOi+JZHj/GL JY1Bsnq2d4b2cf6TK4jQ+QhtSzWW15BsvpngRaRN8QujCQAxkqO+xMthrHDTNUorGXXq es3Ls1F8LMgZlajGY48u7QPsmYNYmJRu9vrx3i3mRfIsMTZy/srIbL7btqaMGmiGoY3s eLMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704408651; x=1705013451; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=VcPQ9Xa0tJ4XfKkhqDvXF2rtEgjcj5MLQaEjWV4A5Kg=; b=sZ6yzluiUwj/S1kL4xuDzAMeMdthMRE8+znKsC+cmG+NNprt1pzJogc1799fhtOud1 t10GPm4EYh9HlCTfZq2SUmVSiDx6WfNmWWwNYCC1RqUk8zuhBFOdQGYw4qnkULDHnKbP 0CN6PrRFR3xEHapYZeZKwERr/t1JuUdcMnGzP4vRADCZpJhP02x9vsHvs+71VJJVN/oc HBtBYGhI/4jxd2HAagrn/Cb3x87/yM9Na+GWy4HNmxw0KE5Mp2uWtECbhf9rzkHDhMAA H/i5FZh+qZ4wFHVup/Lzud6jiq2tR3ZK7l+gKDUPwTE4OsjxBsFBp0ieYAolIEhfnNqj tF6w== X-Gm-Message-State: AOJu0YwjK7P8PRAxytk+PHZ+Ce8ya3D67t5lIEuldeyxpRlCcV1wmaKg ppjVsKblw18CS0awFQU883++TLKSoTals73/gwMGvBWf3/0= X-Received: by 2002:a5d:464a:0:b0:337:43c2:d17b with SMTP id j10-20020a5d464a000000b0033743c2d17bmr377479wrs.77.1704408650907; Thu, 04 Jan 2024 14:50:50 -0800 (PST) Received: from [192.168.199.125] (178235179036.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.36]) by smtp.gmail.com with ESMTPSA id co22-20020a0564020c1600b00556cf695da0sm214100edb.78.2024.01.04.14.50.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 Jan 2024 14:50:50 -0800 (PST) Message-ID: <33b32e2b-fa35-448c-8b4c-c5c51a514922@linaro.org> Date: Thu, 4 Jan 2024 23:50:48 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] phy: qualcomm: eusb2-repeater: Drop the redundant zeroing Content-Language: en-US To: Abel Vesa , Bjorn Andersson , Vinod Koul , Kishon Vijay Abraham I Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org References: <20240104-phy-qcom-eusb2-repeater-fixes-v1-0-047b7b6b8333@linaro.org> <20240104-phy-qcom-eusb2-repeater-fixes-v1-2-047b7b6b8333@linaro.org> From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA6TiNvEpDKPiT3IDs42THU6ygslrBxyROQPWLI9IL1y8S6RtEh8H+NZQWZNzm UQ3imZirlPjxZtvz1BtnnBWS06e7x/UEAguj7VHCuymVgpl2Za17d1jj81YN5Rp5L9GXxkV1 aUEwONM3eCI3qcYm5JNc5X+JthZOWsbIPSC1Rhxz3JmWIwP1udr5E3oNRe9u2LIEq+wH/toH kpPDhTeMkvt4KfE5m5ercid9+ZXAqoaYLUL4HCEw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RHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <20240104-phy-qcom-eusb2-repeater-fixes-v1-2-047b7b6b8333@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4.01.2024 15:52, Abel Vesa wrote: > The local init_tlb is already zero initialized, so the entire zeroing loop > is useless in this case, since the initial values are copied over anyway, > before being written. > > Fixes: 99a517a582fc ("phy: qualcomm: phy-qcom-eusb2-repeater: Zero out untouched tuning regs") > Signed-off-by: Abel Vesa > --- That's another good spot.. partial struct initialization of pm8550b_init_tbl zeroes out the uninitialized fields. > drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c | 10 ---------- > 1 file changed, 10 deletions(-) > > diff --git a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c > index 5f5862a68b73..3060c0749797 100644 > --- a/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c > +++ b/drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c > @@ -156,16 +156,6 @@ static int eusb2_repeater_init(struct phy *phy) > > regmap_field_update_bits(rptr->regs[F_EN_CTL1], EUSB2_RPTR_EN, EUSB2_RPTR_EN); > > - for (i = 0; i < F_NUM_TUNE_FIELDS; i++) { > - if (init_tbl[i]) { > - regmap_field_update_bits(rptr->regs[i], init_tbl[i], init_tbl[i]); > - } else { > - /* Write 0 if there's no value set */ > - u32 mask = GENMASK(regfields[i].msb, regfields[i].lsb); > - > - regmap_field_update_bits(rptr->regs[i], mask, 0); > - } > - } > memcpy(init_tbl, rptr->cfg->init_tbl, sizeof(init_tbl)); I think this patchset can be made even better, this memcpy is also useless and we can simply initialize init_tbl=rptr->cfg->init_tbl. Konrad