Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35118943rwd; Mon, 10 Jul 2023 02:53:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlHUyhY7Hz79J/G49j4sRrMtxqQ9WqJW2DfuQ6ee017WcrjJfqaN1eADYxu/KThi4Ae/8Hcs X-Received: by 2002:a05:6a00:1a8f:b0:647:4dee:62b7 with SMTP id e15-20020a056a001a8f00b006474dee62b7mr10647987pfv.29.1688982818804; Mon, 10 Jul 2023 02:53:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688982818; cv=none; d=google.com; s=arc-20160816; b=FlWLNMGKYEv78e4wnIalaT17ycIy428Ld1qAy+Vp72KyR2tDJ6+9eG4G2xhkPBERyB GfACtj3mZZi8oKQvZGHFTHiGGqFwjEJS3sKmbQMDkz4XkRqXTKOfSRNBPHHeWM/GTdOm ykH/qbZC8AoVPTID+ly97mGlr0zFDHdQFhnqUOLZWqxrO0qQJvsk7zQDJxcCckrIxA5j Yp7PQj/0HINcKM5qjYA31CCyRqgxHCRfxa0xj9n7YlTHTZ1R9NI4c31rXuhTFPJ9rlYv peabuuwGWU2SpVVi/fNpk85PQIgLcJiGzeIWQxVlXSD5p5dkRON4SlXodwnLArxH3FwW YTMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3sn9x6LPURIkACvJ8wBuzhnqLoBajZ+a9zbPd+UfSdg=; fh=NxJqepo0PIqthCwrW2TckhvTvgrGU+t9qvJ/3rt8EAE=; b=VOYUXkMbp2C/KsggPk8cKbpUntlMIc69OuNJyuWTu+MVcTUt2g1G3c5BoV1ZIVLSr2 ec1xj6JUrSJba1+pGN7IfxRJ9Wnexelo17QM3XfORw3qkZ9d19YB4R5di8CZRf8gdMla z47jK+SbGuJd9p0A09EfkutDtHCbgM4adPd+RhxxokzpLSgh41p4SMFViLg3JXwl6R8Y +Q46zZZAkGUpFNijXVBEpN7mSaq8IFIqx3BkUVq+TzY3JfEOjclTIFJeJQggmjtvD+HO Zgl5Jj28eLoM/0vgyrMzeKgaEvEgGelWI7GYEPh/8tyPfCfdRP467N0dsBgxaBmBKjkK 03iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kR6BAjWj; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cq18-20020a056a00331200b0068265f40634si8721655pfb.400.2023.07.10.02.53.26; Mon, 10 Jul 2023 02:53:38 -0700 (PDT) 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=@intel.com header.s=Intel header.b=kR6BAjWj; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233041AbjGJJut (ORCPT + 99 others); Mon, 10 Jul 2023 05:50:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231978AbjGJJt4 (ORCPT ); Mon, 10 Jul 2023 05:49:56 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C22723AA5; Mon, 10 Jul 2023 02:44:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688982279; x=1720518279; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=2khzmhKhnoS24cYl9j3/7m5Qz5fUfM6HHTw49kzdp3M=; b=kR6BAjWjP5bdm/GB8zjep0dapC/bnLAgokeDpCuI1V9UZjoTsuruSEKs QUkyJQTrOrcG84JvzcEgPIWoZgjnFoyV0OGl4haCduoYhEeQGHw8LngSq hdZ2OBCRt+1OhoqnEg7KnSUY25FkGaj62wTrIil/ZP+hK64bzlYg6rcu0 GN0BU+qw6fG22LGFEBswU8sUjlu+OJf7PMiiK2Hqaq8wg9fs6TuHKzk43 IjB2tIi2TxpeaGiX9iudD2rJFJUNNe6ssVlVGAU5AOEItEVhCUBt47/j/ zUa/xi6ErDXBhYAMHjrmgw/MsqjlEU7yFIJEXT5Zy5GCDCWeAoCoD+QR2 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="363165733" X-IronPort-AV: E=Sophos;i="6.01,194,1684825200"; d="scan'208";a="363165733" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jul 2023 02:44:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10766"; a="894718881" X-IronPort-AV: E=Sophos;i="6.01,194,1684825200"; d="scan'208";a="894718881" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 10 Jul 2023 02:44:37 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qInRc-001W6x-0r; Mon, 10 Jul 2023 12:44:36 +0300 Date: Mon, 10 Jul 2023 12:44:35 +0300 From: Andy Shevchenko To: Linus Walleij Cc: Greg Kroah-Hartman , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Bin Liu Subject: Re: [PATCH v1 1/1] usb: musb: Use read_poll_timeout() Message-ID: References: <20230703121936.71623-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 On Tue, Jul 04, 2023 at 11:08:41AM +0200, Linus Walleij wrote: > On Mon, Jul 3, 2023 at 2:19 PM Andy Shevchenko > wrote: > > > Use read_poll_timeout() instead of open coding it. > > In the same time, fix the typo in the error message. > > > > Signed-off-by: Andy Shevchenko > (...) > > + ret = read_poll_timeout(gpiod_get_value, reg, !reg, 1000, 100000, true, > > + glue->intpin); > > Wow that's really cool. I had no idea that you could use read_poll_timeout() > together with gpiod_get_value() like this! Yep, after 5f5323a14cad ("iopoll: introduce read_poll_timeout macro"). I just realized that we need to bump the sleep_us parameter as beneath it divides it by 4, so I would put 5000 there in v2. > Reviewed-by: Linus Walleij Thank you! -- With Best Regards, Andy Shevchenko