From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) (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 169CE15853B for ; Sat, 6 Jun 2026 01:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780708950; cv=none; b=MVT7HDQLrSohr/Xiz0t/jBcX7uf/IgyvOHH9+R3IP5vm+fsX+73NLTGO+nHcsD4WsVbpB2OIdyB41m0j+4ztU8hlOFwFFIrsGLUeTWvTB3/OpdAnPZWfzHdqx3Uy4FAp5mptn608eEjIF+dcePLUftEur6HUcPD4fDc38xDPOoM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780708950; c=relaxed/simple; bh=DdNbwh3uZqSxtCXgBeeN3jZmiPFBqAEdSpIR+h94nso=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=h50mwCHmgbnTSnoTQk8Cxh3KvzY6kRFcGM11G3vdnb6IttDcb8OLjJdpiSr32QoiEtdUUAaL0zhXZ2SBRoWUG+roRZXRShAMT1oQirRuI5W/lYplIl1l3rHzBPKeY8rybDdF4tBADNkDp4jWFrT8vONL8FKp5tcmhicsoEYZhGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com; spf=pass smtp.mailfrom=perches.com; arc=none smtp.client-ip=216.40.44.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perches.com Received: from omf08.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 25BA0120345; Sat, 6 Jun 2026 01:22:21 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf08.hostedemail.com (Postfix) with ESMTPA id 8D66720026; Sat, 6 Jun 2026 01:22:18 +0000 (UTC) Message-ID: <70d52d972aaf1e76836db9d8b93276d578e1df3a.camel@perches.com> Subject: Re: [PATCH v3] checkpatch: Check WQ_PERCPU or WQ_UNBOUND presence in alloc_workqueue() users From: Joe Perches To: Marco Crivellari , linux-kernel@vger.kernel.org Cc: Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , Tejun Heo , Frederic Weisbecker , Sebastian Andrzej Siewior , Michal Hocko , Breno Leitao Date: Fri, 05 Jun 2026 18:22:17 -0700 In-Reply-To: <20260605074309.49270-1-marco.crivellari@suse.com> References: <20260605074309.49270-1-marco.crivellari@suse.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Stat-Signature: eu31u8mwpkuchuhbe89he4a7dtts3oz3 X-Rspamd-Server: rspamout04 X-Rspamd-Queue-Id: 8D66720026 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX18VbKDhNKLNPHdAv9BalLSLy+cZjRNLjIs= X-HE-Tag: 1780708938-790681 X-HE-Meta: U2FsdGVkX1/QGBPEYaP5BhxJWIBpOpP6YtOsC8xf2vX8WTiArvlS5iGz+TzTXgvEjLZYYZLMIRo/Vpa4Go+7eaAfsr+SWCCHelXeZsMjs6h2cf0+JYVNGrFy2Qiar32E2b/no39V8Who366KpwQUsbi97//c7nzUBFN+b4vOrNE+6lu80x3JYV9bxE1X15vP6tCt3bus2AN+C8+XqfPY6/PzphvzIC9SsAxAw1NYYVbyui2J2NQqpm6WaR+HhcIp/FLBVyjZNVRReFtvjdKxPHchBlcXhroz7MZSxRCzrF1HHqx1P1iX24OUNd+9vxEWGkOIntePa0CRCOI+FQQQOZpJ6vRAbfCT54UrGod0D23ht9/WJYzU699UVC+EmD/H On Fri, 2026-06-05 at 09:43 +0200, Marco Crivellari wrote: > The workqueue API introduced a new flag, WQ_PERCPU, that has to be used w= hen > WQ_UNBOUND is not present. One of these flags must be present, but not > both of them. [] > Signed-off-by: Marco Crivellari <[marco.crivellari@suse.com](mailto:marco= .crivellari@suse.com)> > --- > Changes in v3: > - code aligned to open parens Not so. > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -7804,8 +7804,31 @@ sub process { > ERROR("UNINITIALIZED_PTR_WITH_FREE", > "pointer '$1' with __free attribute should be initialized\n" . = $herecurr); > } > - } > =20 > +# check alloc_workqueue() parameters for WQ_PERCPU and WQ_UNBOUND uses > + if (defined($stat) && > + $stat =3D~ /^[ \+]\s*(?:$Lval\s*=3D\s*)?((?:devm_)?alloc_workqueue)\s= *($balanced_parens)/) { Properly aligned would be 2 tabs then 4 spaces $stat =3D~ /^[ \+]\s*(?:$Lval\s*=3D\s*)?((?:devm_)?alloc_workqueue)\s= *($balanced_parens)/) { [] > + if (defined($error_msg)) { > + my $stmt_cnt =3D statement_rawlines($stat); > + my $herectx =3D get_stat_here($linenr, $stmt_cnt, $here); > + WARN("ALLOC_WORKQUEUE_FLAGS", > + $error_msg . $herectx); 4 tabs then 5 spaces