Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp436760rdb; Fri, 17 Nov 2023 03:16:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGrAX+XLYkLuMX9bTvBGIzEMzXgdNdgNPiZFQCuCnuVpy+fivEzS2OXwrgOnA6gzx4/W5RE X-Received: by 2002:a05:6a00:1bca:b0:68f:f38d:f76c with SMTP id o10-20020a056a001bca00b0068ff38df76cmr16635048pfw.6.1700219765271; Fri, 17 Nov 2023 03:16:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700219765; cv=none; d=google.com; s=arc-20160816; b=OuTDJZ+gpHSFGk8tAXFLWxUWD/nUrBDw0vxHXofLMJ0cdzTMNbrdDp7Swys3F9rKuX /t/f/1Lk+pO8svdsmVLcpnvQmMBaV/uWCzrILPWqrvDDfkSJ6+0f9rfa35R/IiD1m0p8 WhIpuEf9myxk9o0CSsVSQhJlqYCh6pRYBKMbiprJklSgDX3Whr1kz/c9ONI3WU8oxg7W axDRvs2VR/5T8zgzXxfGq7syfRY8PaFOYLcADwb9RXPd09V1iF0CJdeAz0/3o5C8hXX+ znRV746upCBR4Qkp69OeTkwvinp2G+hYBZqwxdHsm5hLgiFJlgFNXTxL5yEZPvALh/t7 fhKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=MEnAPhotGrymqx9LWYvphkRnK4e8fFIFQk+XIJhM+Ew=; fh=pm6lM3UqDIPs/aAq/43PUxPgrPpH+VJpTzRQZpNfirI=; b=QJ4UnyjGpQFeOZPkf97y4ux3HhBpaD0SE0F4YOREqtQLjyEgf9eGJlqQV7rnKV1zBz Txqa0AOn8PBwt/7VYo2Oz6X1ZFGrgUTN67gtb/n9ihQZu2Ej4H+OK6DvvSj/NI9jCD42 DrZACA+sT6VlDXdHPHst8ENUPmXGb/kojUMBPp9m4QeQbLfOtRIxGCtDyU0lJ97vDhZM 2XvqWK0mtS+E+h8M77kjPixe1I46PMM6ypqvMeCVNLpcw8QozNSE8QVEeill06qJiHv6 BL8Nu84w5O5Po/HUOjr4JCJc61MZiajDcEUdr8KdoOTLawzuTuLvaVPOpN4YFfzLZIp3 eRJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bv2DM1K8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id v129-20020a626187000000b006c7c68e991csi1624416pfb.309.2023.11.17.03.16.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 03:16:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bv2DM1K8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 23D178080D6B; Fri, 17 Nov 2023 03:16:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234145AbjKQLPy (ORCPT + 99 others); Fri, 17 Nov 2023 06:15:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231274AbjKQLPw (ORCPT ); Fri, 17 Nov 2023 06:15:52 -0500 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E5CEC2; Fri, 17 Nov 2023 03:15:48 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 71B84FF80A; Fri, 17 Nov 2023 11:15:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700219747; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MEnAPhotGrymqx9LWYvphkRnK4e8fFIFQk+XIJhM+Ew=; b=bv2DM1K8sfN7my6DGyXah1OW8f8ligLTQQbv2oeWPGfbH3pLz1fHL6HIMNb++VwFLFUVVA FE1nA3josktfusczdxPl+/rQoN0T4Ts/w9mObdtiQ3g+qXqd/2nOanonmA9tPh1TFCGkZy vgD1OEXfv9yMX3wPMJBwJ1L7Fioj7+jPPTa2tP2+0VOLLGbavTY4V6X7mdLdLX74HTOCqa Uym+ZBpydJjuw0j3sGy+LIobi0T+MVrTtbNfVQjq1lvXM7AcZSlCvVEPZTOEYdFSrGkwC5 I35VqoXtIL/pbJ6TDyFwSYqTOdtcYWRmlpXFo3EoXpFl4VHg/WpGxLAOmMmI4Q== Date: Fri, 17 Nov 2023 12:15:45 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Andrew Lunn Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH net-next 9/9] net: pse-pd: Add PD692x0 PSE controller driver Message-ID: <20231117121545.2f950d43@kmaincent-XPS-13-7390> In-Reply-To: <47d42d52-943c-467d-bcc0-fcb274f69841@lunn.ch> References: <20231116-feature_poe-v1-0-be48044bf249@bootlin.com> <20231116-feature_poe-v1-9-be48044bf249@bootlin.com> <47d42d52-943c-467d-bcc0-fcb274f69841@lunn.ch> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.com X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 17 Nov 2023 03:16:02 -0800 (PST) On Thu, 16 Nov 2023 23:38:08 +0100 Andrew Lunn wrote: > > +static int pd692x0_send_msg(struct pd692x0_priv *priv, struct pd692x0_= msg > > *msg) +{ > > + const struct i2c_client *client =3D priv->client; > > + int ret; > > + > > + if (msg->content.key =3D=3D PD692X0_KEY_CMD && priv->last_cmd_key) { > > + while (time_is_after_jiffies(msecs_to_jiffies(30) + > > priv->last_cmd_key_time)) > > + usleep_range(1000, 2000); =20 >=20 > That is a bit odd. Could you not just calculate how long a sleep is > needed, rather than loop? Oh, right indeed! Don't know why my brain wanted a loop here. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com