From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB284C4338F for ; Wed, 28 Jul 2021 10:20:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D74760F93 for ; Wed, 28 Jul 2021 10:20:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231881AbhG1KUH (ORCPT ); Wed, 28 Jul 2021 06:20:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:41304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229574AbhG1KUG (ORCPT ); Wed, 28 Jul 2021 06:20:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8141A60524; Wed, 28 Jul 2021 10:20:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627467603; bh=zFSbDd6JWCp56TFFucOBP/1daI+vXpebuc2/z74R6tU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hXXb8EAQVILloBPsr+wofuDf1pR1/dQynUqMzQrWpZ06knZLf+hLQA7TIo+3Ztflk tRw7CNp8sIyosItKxGsEsUoPSOBMkQNzzHgOqMkL/L2PCvKO0XoXXtRQgIM+Rd04D8 Rn29nyFNaTnjPR1/n6ROqKrchcJDPZmMvhIFowZU= Date: Wed, 28 Jul 2021 12:20:01 +0200 From: Greg Kroah-Hartman To: Pavel Machek Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Mathias Nyman , Carsten Schmid Subject: Re: [PATCH 5.10 167/167] xhci: add xhci_get_virt_ep() helper Message-ID: References: <20210726153839.371771838@linuxfoundation.org> <20210726153845.014643770@linuxfoundation.org> <20210728101040.GA30574@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728101040.GA30574@amd> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 12:10:40PM +0200, Pavel Machek wrote: > Hi! > > > From: Mathias Nyman > > > > [commit b1adc42d440df3233255e313a45ab7e9b2b74096 upstream] > > This is yet another variation in upstream commit making. So far I was > using these: > > ma = re.match(".*Upstream commit ([0-9a-f]*) .*", l) > if ma: > m.upstream = ma.group(1) > ma = re.match("[Cc]ommit ([0-9a-f]*) upstream[.]*", l) > if ma: > m.upstream = ma.group(1) > ma = re.match("[Cc]ommit: ([0-9a-f]*)", l) > if ma: > m.upstream = ma.group(1) > > I guess I could update second regexp to search anywhere in the > line.... but at that point it will also match stuff like "commit 1234 > upstream is broken". > > Do you have suggestion how to extract upstream sha1 automatically? I use: grep -E -o '[0-9a-f]{40}'