Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1283702lqe; Mon, 8 Apr 2024 04:50:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU13EcvsM7hWdSmBIntnyOPoLTkZBOJAdSbHtudx8dXIb6vC/AXqcmnD3qXzi2OCS+HcEFM9PxFre2X4gRHLJxjs0B+updPTwwhueNgQA== X-Google-Smtp-Source: AGHT+IHcZBt+Nwk5B2J0L/V28bohJqJjVrsHLEXM0ov/oSIcN+woAAdsnFdHJN+H18n40N0Dd/Px X-Received: by 2002:a50:9b59:0:b0:56e:e76:6478 with SMTP id a25-20020a509b59000000b0056e0e766478mr5283966edj.31.1712577011020; Mon, 08 Apr 2024 04:50:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712577010; cv=pass; d=google.com; s=arc-20160816; b=r2F2iTnG4F8TxDuHb8POrGOS5tMPFw04zpB1Hv7QfiCXDs48D5lGvLKhsZ+SazF8kB F4vGa+pFX6iRGptWnQIUFENIau0LFARU3eMlq1SLdjKXLW5rhGLDQg+DjpDx+0vQCa16 Y/drsng8C7Fctluu1nn9R1IchV3JZO/Ht7XnEW+RmUtfXzYb+llUmmoQt+mvddOjU8l9 YgmbWJly+DiJ3cmwcc4LBRhoNgdxNJS6kAf1zRYUeHF2GfUWqYe0Ll24McoarY8NhttK 6iAa9nA1GVBYO2XbG7++ySiEdztZzVGME0EJzI+1RBgsSWUUFUzctUeXWQ+ahu+zl/MQ EcoQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=fBUkqDZ3IYqMXS9EkDuIUyapeXTdHgsmX/aKQ2vj1Pg=; fh=oSZiOlNF3VCT1tvgS4oAwxdW9fRM6kPJNsU8t60OD5A=; b=d5j0rW+9aDC9EsOhi6CmFYG4Fst3jmQaBeeXQyva7E03My/zyHP85gKVNtyk1KAGsL cQ8F3X26xJfj4nhpw+UnlUIQOaHpmA6nDQjYCHrT5amUVvvP/HfNDkJEJunmligsBxT/ 8ezdGtf3FsSgqd4QfgYdC8AX3JPPV1m9FMTdGMFPW6o2TBGH57Zbz9vd0fCzXuTVyiBT yOOzd5D1da1NIe76okKMCMCHd3J5FLVQBQ76TgKLPDFWcLxFpU85sodmQu9n2VarqzpR 5JVvmpvYRyK1T9B1UWSOh8ogEmAG5E8AngjzM42c1PZCh7zDMTMix1NtfUIqLazWJZ2V WTfQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ad7xvLFh; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-135285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w19-20020a05640234d300b0056c36aa0897si3747338edc.0.2024.04.08.04.50.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 04:50:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-135285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=ad7xvLFh; arc=pass (i=1 spf=pass spfdomain=linux.ibm.com dkim=pass dkdomain=ibm.com dmarc=pass fromdomain=linux.ibm.com); spf=pass (google.com: domain of linux-kernel+bounces-135285-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-135285-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B9FA41F2274E for ; Mon, 8 Apr 2024 11:50:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8967369E0D; Mon, 8 Apr 2024 11:50:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="ad7xvLFh" Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96EAE6A004; Mon, 8 Apr 2024 11:50:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712577003; cv=none; b=iWerfz1Qv+aciD1GEMszC7cXdiJqn9FnX6MRla5ABWqMd2uelBkwUtPqVz0YsP6Q/EYY+CF4H3kPUeKlDLUcgFdHfdOAdnLHNhjJJvxyQl8k0M3wMeHkAnNShxfkRgpDh8lNtGdP56TvNHsACGrjrkzEI8VAYMo9ZLLzB6lbuuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712577003; c=relaxed/simple; bh=2C+83G7Qg8cx//dOdpr8x7fJsrvBGPsl4sgTNc7EWB4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Hhwxm8JfcVXhpxtKx6sRiBuCpu/OJ3nnRaWwvEBCpb19t/7WyZGXxss0vhQfQW6lK9Xbp3VJS4U5PCgrxcZA8+yOLpgwZ0k3ARpkmwDksFDSVTyRu6bqyas40dPltzorUupKG+MhBzOH3TJVz/JAelPWRNYyo69j8nEWU4bCjEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=ad7xvLFh; arc=none smtp.client-ip=148.163.158.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 438BH2Ya007723; Mon, 8 Apr 2024 11:49:57 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=pp1; bh=fBUkqDZ3IYqMXS9EkDuIUyapeXTdHgsmX/aKQ2vj1Pg=; b=ad7xvLFhTBX4QK4B33OfW5R0gyzsacionM3U3z5IZvjL9FWYQa2OG5OYVk85EzwgI1oE BCSNJiquK+WwCUda4ScjVXb12pd8+dG+Jdjorquz43RBus2EVDJR2Es7VxM7locSF8kd +A0xziJENq5JL+sw5FmIow79zmdAyfzapl15M9cWqS7c1Hbv0LwZ7qYuj/9NjpS5tswe qIShKD7FetRxBzyCkQ4mwqM8xCrI6g3cvqB8c3gKpoWYVjhR+4i7swQ4EQx319ph+XXU uX0EJPuQYYRPJjh1z8VK/U7OVDGn1gtQZ+cLDO+kqEvBBUFWEJMPl2gHE1p5Km2FQDdY Rg== Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3xceue843k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Apr 2024 11:49:57 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 438B6MhR019082; Mon, 8 Apr 2024 11:48:42 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3xbh4001am-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Apr 2024 11:48:42 +0000 Received: from smtpav04.fra02v.mail.ibm.com (smtpav04.fra02v.mail.ibm.com [10.20.54.103]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 438BmaFA18219474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 8 Apr 2024 11:48:38 GMT Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8FD652004F; Mon, 8 Apr 2024 11:48:36 +0000 (GMT) Received: from smtpav04.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0296F2004E; Mon, 8 Apr 2024 11:48:36 +0000 (GMT) Received: from osiris (unknown [9.171.19.167]) by smtpav04.fra02v.mail.ibm.com (Postfix) with ESMTPS; Mon, 8 Apr 2024 11:48:35 +0000 (GMT) Date: Mon, 8 Apr 2024 13:48:34 +0200 From: Heiko Carstens To: Thorsten Blum Cc: Vasily Gorbik , Alexander Gordeev , Christian Borntraeger , Sven Schnelle , Frederic Weisbecker , Ilya Leoshkevich , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] s390/smp: Use min() to fix Coccinelle warning Message-ID: <20240408114834.9447-B-hca@linux.ibm.com> References: <20240408105124.2162-2-thorsten.blum@toblux.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240408105124.2162-2-thorsten.blum@toblux.com> X-TM-AS-GCONF: 00 X-Proofpoint-GUID: rQoebr9-ZHQAPjHPh-UDyFccSYBUn8Ho X-Proofpoint-ORIG-GUID: rQoebr9-ZHQAPjHPh-UDyFccSYBUn8Ho X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-04-08_10,2024-04-05_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=749 clxscore=1011 phishscore=0 suspectscore=0 bulkscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2404010000 definitions=main-2404080090 On Mon, Apr 08, 2024 at 12:51:25PM +0200, Thorsten Blum wrote: > Fixes the following Coccinelle/coccicheck warning reported by > minmax.cocci: > > WARNING opportunity for min() > > Signed-off-by: Thorsten Blum > --- > arch/s390/kernel/smp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c > index 0324649aae0a..d69cf2475744 100644 > --- a/arch/s390/kernel/smp.c > +++ b/arch/s390/kernel/smp.c > @@ -1205,7 +1205,7 @@ static int __init s390_smp_init(void) > > rc = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "s390/smp:online", > smp_cpu_online, smp_cpu_pre_down); > - rc = rc <= 0 ? rc : 0; > + rc = min(rc, 0); No. This decreases readability. Please do not send such patches just because Coccinelle reports something.