Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2590634rdb; Mon, 4 Dec 2023 01:41:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEvyt7BUgRz20uhw/2wd/GWZkIZJH70lhQdREO7d5kZrhypr9Aew4h42Zj/nPjVUFIiQps9 X-Received: by 2002:a17:902:b087:b0:1d0:6ffd:6104 with SMTP id p7-20020a170902b08700b001d06ffd6104mr3797749plr.38.1701682903027; Mon, 04 Dec 2023 01:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701682903; cv=none; d=google.com; s=arc-20160816; b=H7AJScdvUwBUovCALj0o5CbMJCLbdNycQqvAiC3RjeEnqrWeTXaf+7TgTp+3gyMBAN DUoV+8HoVBoQr8xTY0MNg+tPpxK6MOi+KD6/cuCb1MRJ+rUsVoEDrD9My5haAWw/vsDC doDmJ95n5VJeHo+yD5/GWjIyE/DbbcC7cUeSCBeJpbnJM+FL8LlsjWkixrYmekEEDnWD DLD/xtagc8A9s0vO15ppBXbqjuIv9Ly03uZIkTMzpE1O53iSKpGp/3hfANcT1Rx0muu1 QEMR9HuAbMak6sENO9Y5r6IQmDfwQDlxXhk357OgsZZGSCuqEjd+uc/HFgnDV0AiG7z6 szMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=3VDOrhhpZyHwMsETPwhmSxEMw1K/gH1++xxfU+EXW1A=; fh=JTJzcaiaQJ+DtM8I5Tx4dhytglwN2LYzllfa53mDGr4=; b=WiQt1b7upSeSnq9mCCRtnq+VsofMkYve1WEPJ545/KaE3fiO3QAOIYoC5nCcXF/N5s Cmae6r2eusGBsIC7ybsDtTc07P4iTQVZ/XQ3hE2W1SCURcC21i9Jc3hCQ3S+k4z912CP gd1pWbSSE2GqpcRWQYZNEP1u3MkIp9dwYjYd9NhltMMLHspKRygy1SgyNKhoTDVmfngA yVuC2euK7vSbTOmqxcBgMxtfcGS/monEPiKJSrJYB63fkHjEaj6aQwTj//vdGDPbLWQi IMZ//9b6jFKJ8mMpcXOSR+x3MKAl2YktTlHIRDj2mXcWUtJPOT01PqCn6F3GJdIQ0SAP qpnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=lnGn8ljX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id r5-20020a1709028bc500b001cf9e863152si2944188plo.642.2023.12.04.01.41.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 01:41:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=lnGn8ljX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 1074080944FC; Mon, 4 Dec 2023 01:41:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235438AbjLDJlX (ORCPT + 99 others); Mon, 4 Dec 2023 04:41:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235631AbjLDJlD (ORCPT ); Mon, 4 Dec 2023 04:41:03 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBE01D4E; Mon, 4 Dec 2023 01:40:59 -0800 (PST) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B48h1r0000668; Mon, 4 Dec 2023 09:40:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=3VDOrhhpZyHwMsETPwhmSxEMw1K/gH1++xxfU+EXW1A=; b=lnGn8ljX7gazFX7P7FvYTxxOH0QhcWnSdeJqWR5e0w6abBTSPr9OxhfFwvMhEYl2Xc4z 6aOtoLDzGohrrZPLzsP2TP8t7IlXy+f8Zg9d6YTlMgUoSxus8KxgBWSkgRrYkzH9mpNx 8nGm07vSgEWJEQddYPQpRcMQoHzYuktpWaGpOFsvSQ7735VLj7n+iqN8DhOUDbZ5ykio hVmtvz1RSYrM6NSVAY6B1P8FZhJobp+GYAih/EPRAjPsjJF+Ntk8/LGtGIsnREzb9uyy 6oZWeSj/1TT4N2AFjcJ47YAlnPJ0sn4q+KXjuU3wBuE4TimhXeCgNWQDJclrNfeUTAcQ 3A== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3usbgf1t94-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 09:40:27 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3B49dt2u009497; Mon, 4 Dec 2023 09:40:27 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3usbgf1t81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 09:40:26 +0000 Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3B474PvC007667; Mon, 4 Dec 2023 09:40:25 GMT Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3urgdkq7j9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 Dec 2023 09:40:25 +0000 Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101]) by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3B49eM2V13697734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Dec 2023 09:40:22 GMT Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 216222004E; Mon, 4 Dec 2023 09:40:22 +0000 (GMT) Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F3ACA20040; Mon, 4 Dec 2023 09:40:20 +0000 (GMT) Received: from [9.179.21.199] (unknown [9.179.21.199]) by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 4 Dec 2023 09:40:20 +0000 (GMT) Message-ID: Date: Mon, 4 Dec 2023 10:40:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 31/35] net: smc: use find_and_set_bit() in smc_wr_tx_get_free_slot_index() To: Yury Norov , linux-kernel@vger.kernel.org, Karsten Graul , Wenjia Zhang , Jan Karcher , "D. Wythe" , Tony Lu , Wen Gu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-s390@vger.kernel.org, netdev@vger.kernel.org Cc: Jan Kara , Mirsad Todorovac , Matthew Wilcox , Rasmus Villemoes , Andy Shevchenko , Maxim Kuvyrkov , Alexey Klimov , Bart Van Assche , Sergey Shtylyov References: <20231203192422.539300-1-yury.norov@gmail.com> <20231203193307.542794-1-yury.norov@gmail.com> <20231203193307.542794-30-yury.norov@gmail.com> Content-Language: en-US From: Alexandra Winter In-Reply-To: <20231203193307.542794-30-yury.norov@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: uDGvSNUw8E8DooRP5CCwhJb8Fm9JXTzZ X-Proofpoint-GUID: CljkFlSZokllTUzPLp-H0mqHW8RlSY7- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-04_06,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 impostorscore=0 phishscore=0 adultscore=0 mlxlogscore=812 priorityscore=1501 mlxscore=0 malwarescore=0 bulkscore=0 clxscore=1011 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312040072 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 04 Dec 2023 01:41:39 -0800 (PST) On 03.12.23 20:33, Yury Norov wrote: > The function opencodes find_and_set_bit() with a for_each() loop. Use > it, and make the whole function a simple almost one-liner. > > While here, drop explicit initialization of *idx, because it's already > initialized by the caller in case of ENOLINK, or set properly with > ->wr_tx_mask, if nothing is found, in case of EBUSY. > > CC: Tony Lu > CC: Alexandra Winter > Signed-off-by: Yury Norov > --- Reviewed-by: Alexandra Winter Thanks a lot for the great helper function! I guess the top-level maintainers will figure out, how this series best finds its way upstream.