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 4D925C00140 for ; Wed, 24 Aug 2022 03:46:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234205AbiHXDqa (ORCPT ); Tue, 23 Aug 2022 23:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53064 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230245AbiHXDq2 (ORCPT ); Tue, 23 Aug 2022 23:46:28 -0400 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58295857D2 for ; Tue, 23 Aug 2022 20:46:27 -0700 (PDT) Received: by mail-pf1-f182.google.com with SMTP id y141so15300601pfb.7 for ; Tue, 23 Aug 2022 20:46:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=jI2M6Sw53Oq7pQkHggixa18lBUiaB/W0BgqIO3iCnzs=; b=x5AoG4AVZV95Iyhjg850g6fFYQTzlUbiysYsvi8LeX9RXgOgmHv1UzZBp/ODXhfE6z iAfKIKvAIJJ5TBQauvmtXawweohpvJ4ZD7NWtQLull6SDMhHGmSQwEH0adIs7nNTjDfN TW4lyqdcG+BpxEJna8BGeET+H3wfBtcG+ALyTFSztDEUy5bBHl9JJfUJbMiwY3sVIMiT tyLLdQDbDs+lnWX+E3i1GKLgtbCDY49d/wfzpcEnQLzz2eM/riFcEF7di5oYHlPTmw4p 4rQsZAJ1l0wmFCbi3fGSMLmNhHNfgqeNnSbY6Ij1WuonvErEw9nVNrNcKE61QeccBb56 eZjw== X-Gm-Message-State: ACgBeo2LPBGiyZg1nfuiMqV1m+Oey5S7ftZt+vlpp5foN1VaL/xdwWXB zuPmo5po8DVMJeU9LNSZvLA= X-Google-Smtp-Source: AA6agR6FpSsiM06J3o1hicVHJa1ZT7wAhJEaHPKyn0f8iSCcD7nIcZPE3dXUERtNcbugZ4AFom4rPQ== X-Received: by 2002:a05:6a00:2302:b0:536:c7c2:10a9 with SMTP id h2-20020a056a00230200b00536c7c210a9mr9654034pfh.11.1661312786688; Tue, 23 Aug 2022 20:46:26 -0700 (PDT) Received: from [192.168.51.14] ([98.51.102.78]) by smtp.gmail.com with ESMTPSA id w1-20020a1709027b8100b0016c16648213sm11074642pll.20.2022.08.23.20.46.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Aug 2022 20:46:25 -0700 (PDT) Message-ID: Date: Tue, 23 Aug 2022 20:46:23 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [for-linus][PATCH 01/10] tracing: Suppress sparse warnings triggered by is_signed_type() Content-Language: en-US To: Linus Torvalds Cc: Rasmus Villemoes , Steven Rostedt , linux-kernel@vger.kernel.org, Ingo Molnar , Andrew Morton , Christoph Hellwig , Luc Van Oostenryck , Jens Axboe References: <20220821000737.328590235@goodmis.org> <20220821000844.510643400@goodmis.org> <5700ac75-f6a9-877e-4011-9b314f12b5ab@acm.org> <02daa3d6-2847-d7e0-e23e-411076c6d4db@rasmusvillemoes.dk> <0163b361-14bf-7b4c-751a-14f1a004b1a9@acm.org> From: Bart Van Assche In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/23/22 18:49, Linus Torvalds wrote: > That's the > >> It does require that kernel change to make >> >> #define is_signed_type(type) (((type)(-1)) <= (type)0) > > part I was talking about. > > So your kernel side patch looks fine, except I don't think you need > the '__force' - the sparse patches in my tree should make sparse happy > about casting '-1'. Thank you for having provided this feedback. If I change the is_signed_type() definition into the above (no __force), the sparse warnings shown in my previous email disappear. Now I'm puzzled about how this is possible. I guess I should take a closer look at the sparse patches. Bart.