Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp1023855rdb; Fri, 1 Dec 2023 05:18:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBFYEZ+VWri9kwW1bviY6GAMimWxv/AX5Vh3ZjDKZjP4tF81nWGxXqEMddWBUBGY7oK788 X-Received: by 2002:a17:902:6a87:b0:1d0:49ca:9b5b with SMTP id n7-20020a1709026a8700b001d049ca9b5bmr3394531plk.31.1701436734041; Fri, 01 Dec 2023 05:18:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701436734; cv=none; d=google.com; s=arc-20160816; b=lBONDdKj6A6hfZ5n1Hj7OetNXxx7Y0ldIere3pV1DPVUXyi8PyFdbLd+4UjfSdnwom Lxzi85ZOP3nKCtbk8PyUdh2yVz+UsbrixNleKkaxIOGRqBXc3KerRFaGL51jc2KkMJYG kvXKGNXXeovWCk1tDhJvThymaFGXjKi0TLubnHBACwJKkE05VeWgA28VPJPcHI/1RTTV gHaZyh1HG0lJ3hrsqtibJj74vD0GGnZLoXeUmL6X3GynNFKAC7M4P9oA+j+n5bTBVgCR gRjoQgTlHt0EOl6Nmh3+YThaI1lMyb0Q7OfCqCJGXtLhu1xYB7IzeUaI+2PF0pM6H7DG OBTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=09w7LW+cnqnlOMOkAO+xvtNckElk6wbrltpRZF7gZK8=; fh=8Mwm0ez0KlhFz/WMq9MiwW4G1mvT8SokH2JSFNctPI8=; b=NFERtx/v+6O2jva1Ipff73VAPwsg/q2SadNlMwMqD8MuWtq0Sm4SvL1U+ezHW44vPm 40EbAIiEz3dzn+X1E9ip0w13nnStEeuysvArfyJLtJ27fcWcnMd3HCoqnrMd98T7OKUq zdMOOj/bbgasPjw0JggtnBnmtz1GFitSQLyXuWKj5vIICiu+E5TFvfwjqHyznZfgT982 WWJRiAPxfxdybNKBAHEMBAS8k+3Ie8E2Jb5R3zkspEWzeBDYpIHgo19DWEz7/++7zA+4 +xvMeLZ0C9445e4MpG8OO4Ai0yR0W2spiUUNL/RlTXVPu1qaJEOW46EMEqMZf/+cRNYy nntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jDbTERif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id w10-20020a170902a70a00b001b973681493si3082646plq.16.2023.12.01.05.18.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 05:18:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jDbTERif; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id E44AB810679B; Fri, 1 Dec 2023 05:18:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378973AbjLANSh (ORCPT + 99 others); Fri, 1 Dec 2023 08:18:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378938AbjLANSg (ORCPT ); Fri, 1 Dec 2023 08:18:36 -0500 Received: from mail-yw1-x1130.google.com (mail-yw1-x1130.google.com [IPv6:2607:f8b0:4864:20::1130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EF0F10E2 for ; Fri, 1 Dec 2023 05:18:42 -0800 (PST) Received: by mail-yw1-x1130.google.com with SMTP id 00721157ae682-5d36fddbe3cso16584827b3.0 for ; Fri, 01 Dec 2023 05:18:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701436722; x=1702041522; 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=09w7LW+cnqnlOMOkAO+xvtNckElk6wbrltpRZF7gZK8=; b=jDbTERifj0EHk24e+bi818C0wkQpVbzuqsDVyzmn9V5jii+a5mYb0kUBmzkNtJTcIQ 5PBIQ0svSwnML2LGV5uiAD9Oj2Pgy9jzOM8k9YsEuFK7NfwK8iQggQg3lXkf7JYGRIfd aVYsZG0tbWukeHJp6bCWo8azR7y+C8JqIaay6cDE2LDBNdUJkMW4egClcRb6MRkGDf+w n7owctiCTjqOG0Zz8F3ChBQu5QwZ5ZmfPodF7Cem+VXB1JHZWSGy84U9/H1SEztF4h9h dedISDAxoxEmmg1ogvBCo5Z3vXbxw6PdeQoBPkU/zC/I6MIOwvf7UFBK7nKoVw97rVHy WLQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701436722; x=1702041522; 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=09w7LW+cnqnlOMOkAO+xvtNckElk6wbrltpRZF7gZK8=; b=gfgKZDOyRP7x3JP5UsBlRXfLNBA3mhkFOce00BKdRUoTj9Okqnk1BuHoAYHvcLbxrT 3eTxK6Gt2H7YKGbbyr+0udOzGZf9nsHrfYVDK54EaI9rBymxPGicejqNbmykwRYDqAgo a4EqSvpz9N2haDqxZwpks9hwsdgRHd9F5kgQGTTKcBiCA75tZ0QB6ZtoSFu8JDDzgZDc 5gQjaGrCUwIOsI/B+L2PSF87EnfM8cjHmdygE/UNxFQ/XDnkBbrWhgR0kE2Skf33NzxT K0yph/JHIITFVIes+Df7ZOiGDGYd6BHcHhzRtA4tkZ6bw4+VQ16goqhbFK6OxdUBkKSk D4zA== X-Gm-Message-State: AOJu0Yx3bEpU2Xn0zwf2e6VN4NKYfdyADFKNWHWB4jb0/q6jDEd6IyWm hH2Qz5rEeYneSZbiMgZCyJ82Oeczxv+FcFk8D1TDeQ== X-Received: by 2002:a81:5743:0:b0:5d3:ba32:a10b with SMTP id l64-20020a815743000000b005d3ba32a10bmr3341733ywb.10.1701436721755; Fri, 01 Dec 2023 05:18:41 -0800 (PST) MIME-Version: 1.0 References: <20231201091034.936441-1-jorge@foundries.io> In-Reply-To: From: Linus Walleij Date: Fri, 1 Dec 2023 14:18:29 +0100 Message-ID: Subject: Re: [PATCH] mmc: rpmb: fixes pause retune on all RPMB partitions. To: Jorge Ramirez Cc: ulf.hansson@linaro.org, CLoehle@hyperstone.com, adrian.hunter@intel.com, jinpu.wang@ionos.com, hare@suse.de, beanhuo@micron.com, asuk4.q@gmail.com, yangyingliang@huawei.com, yibin.ding@unisoc.com, victor.shih@genesyslogic.com.tw, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 01 Dec 2023 05:18:53 -0800 (PST) On Fri, Dec 1, 2023 at 10:47=E2=80=AFAM Jorge Ramirez = wrote: > On Fri, Dec 1, 2023 at 10:39=E2=80=AFAM Jorge Ramirez-Ortiz, Foundries wrote: >> On 01/12/23 10:28:52, Linus Walleij wrote: >> > > + const unsigned int mask =3D EXT_CSD_PART_CONFIG_ACC_RPMB; >> > > int ret =3D 0; >> > > >> > > - if (part_type =3D=3D EXT_CSD_PART_CONFIG_ACC_RPMB) { >> > > + if (part_type & mask =3D=3D mask) { >> > >> > That looks complex, can't we just: >> > >> > if (part_type & EXT_CSD_PART_CONFIG_ACC_RPMB)? >> >> >> I chose to mention the mask nature of the field for clarity - just in >> case - but I'd much rather do your suggestion. So will do :) > > > sorry no, I mispoke (I like clean code so yours looked neat) > we have to compare against EXT_CSD_PART_CONFIG_ACC_RPMB > bitfield since part_type could be EXT_CSD_PART_CONFIG_ACC_BOOT0 (0x1) > in which case we have to skip it. Aha those defines are not flags but enumerators. I get it. Yours, Linus Walleij