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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63E1CC43219 for ; Thu, 3 Nov 2022 12:57:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbiKCM5c (ORCPT ); Thu, 3 Nov 2022 08:57:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiKCM53 (ORCPT ); Thu, 3 Nov 2022 08:57:29 -0400 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92A36110B; Thu, 3 Nov 2022 05:57:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=QgYVtwHpYFw03zFyQCrKiDUNLViSFeX3zTBG3z4JYH4=; b=XReocNVr2c+W3z+RNnZIxMY6bPTC+O1WnpPmvD3ZRwfTDXDvNDn2UE2z Kh1b9gPMyDCE9dmkkPy8Ib97DUQPjkernn8PonA+F/TEhVoVcomhxzD51 liRkPSVO9eq5upX6qkl5wh0RHSo6PhT3WCDZxY49YxG8ojU69vhG3CrZt g=; Authentication-Results: mail3-relais-sop.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=julia.lawall@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="5.96,235,1665439200"; d="scan'208";a="36363611" Received: from dt-lawall.paris.inria.fr ([128.93.67.65]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2022 13:57:27 +0100 Date: Thu, 3 Nov 2022 13:57:26 +0100 (CET) From: Julia Lawall To: "Jason A. Donenfeld" cc: Kees Cook , cocci@inria.fr, Linus Torvalds , Alexey Dobriyan , akpm@linux-foundation.org, linux-kernel@vger.kernel.org, mm-commits@vger.kernel.org, masahiroy@kernel.org, gregkh@linuxfoundation.org, andriy.shevchenko@linux.intel.com, Stephen Rothwell Subject: Re: [cocci] [PATCH -mm] -funsigned-char, x86: make struct p4_event_bind::cntr signed array In-Reply-To: Message-ID: <8e7bcf3-2d39-a9f2-f818-ec627e5d5c4e@inria.fr> References: <20221020000356.177CDC433C1@smtp.kernel.org> <202210201151.ECC19BC97A@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Nov 2022, Jason A. Donenfeld wrote: > Hi Julia, > > On Thu, Nov 3, 2022 at 1:45 PM Julia Lawall wrote: > > It should work now. > > Thanks! > > > However, without disable optional_qualifier, char is > > still matching signed char. If you think that should be changed, I can do > > that. > > Does `optional_qualifier` disable other things that might be > interesting to have? If so, maybe this is less than ideal? If not, > maybe it doesn't matter? Optional qualifier only allows a metavariable declared to have a certain type to match an expression that has the same type with signed, const, or verbatim in front of it. Disabling it forces you to write our signed, const etc explicitly when you want them. So rules may becomes more verbose. julia > > Though, for what it's worth, gcc treats `char` as a separate type, > even when using `-funsigned-char` or `-fsigned-char`. > > Jason >