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 X-Spam-Level: X-Spam-Status: No, score=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E13BFC352BE for ; Sat, 18 Apr 2020 19:17:18 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69A88221F7 for ; Sat, 18 Apr 2020 19:17:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="u6Xmg1Sn"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="VUI+VnT1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69A88221F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id B2BDB15E0; Sat, 18 Apr 2020 21:16:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B2BDB15E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1587237436; bh=nJnKcpqe99fN65NLQUHGPXgQLocTjwSyWw16Krxp1pM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=u6Xmg1SnsTBNyE5D6hSC959BR/GuIuZvVYrCiNDJnCUQHHS31X8L52GPdWslV89T9 24IpTuZZMDu8R5oscKIWKFrxSkzYV8zi8HP0cflrTTBpZ6xFJfTUtLsMrd8PeylAbY f25x76BYe6N7JeqVpXY3K4gbbbkFK84unHQdBARY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3EA51F800E7; Sat, 18 Apr 2020 21:16:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E5D22F8014E; Sat, 18 Apr 2020 21:16:24 +0200 (CEST) Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 26152F800E7 for ; Sat, 18 Apr 2020 21:16:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 26152F800E7 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="VUI+VnT1" Received: by mail-lf1-x144.google.com with SMTP id r17so4613286lff.2 for ; Sat, 18 Apr 2020 12:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=M5L2K70fxOQxP+uWdRM/yMA+3xinlowUvRSVTNSTLNw=; b=VUI+VnT1NDQO7RfejypC/A0x1WOF6JlDgQOx4uVj0o8myo36afYqYoAB1bDh9hMclE y2579x/RBIr7L8eyYz+tWMdcXNGl1k4dVtK8zltRzr1OvNlhqXGfw7OPYoGf+9sgrfJ0 nPVwr3eWFbVskZYoGSYtK1N/R40NufLSxc2Ks= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=M5L2K70fxOQxP+uWdRM/yMA+3xinlowUvRSVTNSTLNw=; b=rJiZ2xRJD311O8ffERK6r/orRziOyWHon8ep2pDhs2e6uIRcGsLXUQzVsdpilyefg5 qrJ/4j9tBQPiljsCwaM2fSHz6svhb8FNRJaFBoXTM/cUtQQS/hd3xIjXhRrqLgEYizJs khTSuhnznJJ1u+Y/nIooaB9W/oikkM9QGm2lPjLoL01px4p6QfM/Rj6fqsMKWkrKLBvA UokbetasuH8L6GzQX1iGO7OPinUzUilGPdqOQ1uAYlZfh9xFgdcyHGsgTmhao7uTtwV8 /YbX8ZnIbryoynWvwjbF4NI0nZUwyKDUasIgmPiQJVVgvZThTuLQ8uHTdBgWW0I9otYH +GFg== X-Gm-Message-State: AGi0PubDfLhHCBx1VCD8fH31J07pUC9KsusZjr9JQHwdoSPg83L7cRG0 /kyYuwyKypQkFIOYdQzY9j5N9YdPjLQ= X-Google-Smtp-Source: APiQypKZ2lsggbsgtqFJAsVAtkgZWeHK4eGMqDGqRNPR25q8YlMoRucMY6n1LYa2lBNEf9l2r8uwbw== X-Received: by 2002:a19:4841:: with SMTP id v62mr5585338lfa.66.1587237374965; Sat, 18 Apr 2020 12:16:14 -0700 (PDT) Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com. [209.85.208.178]) by smtp.gmail.com with ESMTPSA id h7sm2475463ljg.37.2020.04.18.12.16.13 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Apr 2020 12:16:14 -0700 (PDT) Received: by mail-lj1-f178.google.com with SMTP id n6so2232750ljg.12 for ; Sat, 18 Apr 2020 12:16:13 -0700 (PDT) X-Received: by 2002:a2e:1418:: with SMTP id u24mr5613429ljd.265.1587237373258; Sat, 18 Apr 2020 12:16:13 -0700 (PDT) MIME-Version: 1.0 References: <20200418184111.13401-1-rdunlap@infradead.org> <20200418184111.13401-8-rdunlap@infradead.org> <20200418185033.GQ5820@bombadil.infradead.org> In-Reply-To: From: Linus Torvalds Date: Sat, 18 Apr 2020 12:15:57 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 7/9] drivers/base: fix empty-body warnings in devcoredump.c To: Joe Perches , Greg Kroah-Hartman , Rafael Wysocki Content-Type: text/plain; charset="UTF-8" Cc: alsa-devel@alsa-project.org, Randy Dunlap , Zzy Wysm , Linux Kernel Mailing List , "J. Bruce Fields" , target-devel , Dave Jiang , linux-scsi , linux-nvdimm , Vishal Verma , Matthew Wilcox , Chuck Lever , linux-input@vger.kernel.org, Alexander Viro , Dan Williams , Andrew Morton , "open list:NFS, SUNRPC, AND..." , "Martin K. Petersen" , Dmitry Torokhov , Takashi Iwai , linux-usb@vger.kernel.org, linux-fsdevel , Johannes Berg X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Sat, Apr 18, 2020 at 11:57 AM Joe Perches wrote: > > sysfs_create_link is __must_check The way to handle __must_check if you really really don't want to test and have good reasons is (a) add a big comment about why this case ostensibly doesn't need the check (b) cast a test of it to '(void)' or something (I guess we could add a helper for this). So something like /* We will always clean up, we don't care whether this fails or succeeds */ (void)!!sysfs_create_link(...) There are other alternatives (like using WARN_ON_ONCE() instead, for example). So it depends on the code. Which is why that comment is important to show why the code chose that option. However, I wonder if in this case we should just remove the __must_check. Greg? It goes back a long long time. Particularly for the "nowarn" version of that function. I'm not seeing why you'd have to care, particularly if you don't even care about the link already existing.. Linus