Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp144623iob; Tue, 17 May 2022 21:45:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztotZpuW70gIPpjR1Ky5yACQGpWfNCfVTjjLbh3W1OCM0JB730Aoi2+xooiR4vxLoY2c4b X-Received: by 2002:a17:902:f70c:b0:14e:f1a4:d894 with SMTP id h12-20020a170902f70c00b0014ef1a4d894mr25911589plo.65.1652849141630; Tue, 17 May 2022 21:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652849141; cv=none; d=google.com; s=arc-20160816; b=HGwRETuQAes0gS1GAK2MC69AZhw9MZFQUjoVD9Ol3iSIo9uCaVnj+vKgHv6ZV4eCn7 DJMMacobhK98LLcfBRUQYjU8LfbBXHlSTgEkX1kbvnEzVCqsp5yqWcWQq6Ns9He2jeZc JndYZnYkh2IvHgoOXZw9VRpD+akGy+eRIUQLDvkuSuXh4Yk1J3//D+FVm9EKdclAYfIk SiHEKqOwck+/E6F2FPi5H8p9BuD6Brqnow63aXDeoKLzJmXtdt4k5vnK0yp1f3/3YSWO rfZfMDL8aTihRV5co43PvfADgkYXfVxeuIwUua//UevRj72XejxMAamVoT3cTReHVBP4 QcIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=redkslta1XvbIHyxCsjCWY1VUKS1fGAK120a9dVCqE0=; b=V+Nm/9cInsL+dZgt0/tQZJ0Ys097xVCo27BPmAoefaH+8TwQjO0TcgF0s9vWfYzWgy pKYY4Q+nxGgkDunP2Kdmf2e3shFGsyRQC9HoHXWdQ2si3PUQ1moB8MgoEswq1Fc9oPSA gJJ/lvM0X+fF4wR1aSxiw5SSFV+vp0Dq5Mj+ZWAn6k9UX7K0ZwUtg94dFbWREitOgGLj BL1gUdBZzYHPtetim9gzpDwTDQPpvfkhzxHXHyx50f0z8OBfrHfWC2NJ+485lHRKPyIm YZLz/Jzfn/nP9WSyq1hjeMeaD+8UEUIzdGGlDGySYvUwK8GuY5wfyHebmiR2lcIEr06b pmsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2VYsal26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id hr9-20020a17090b138900b001c73b8066e0si1422561pjb.74.2022.05.17.21.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:45:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2VYsal26; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8A17BEABA9; Tue, 17 May 2022 20:57:43 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239985AbiEQGjJ (ORCPT + 99 others); Tue, 17 May 2022 02:39:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231146AbiEQGjE (ORCPT ); Tue, 17 May 2022 02:39:04 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99E3944754; Mon, 16 May 2022 23:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=redkslta1XvbIHyxCsjCWY1VUKS1fGAK120a9dVCqE0=; b=2VYsal265wSEt0XMzRpPZMcSA4 XbHkNSnYJq1bRT6O2KxYYXv+FHMr4fyA2sYLg53IxwbLs1fy9Re2VxvsCTcrs2aITGnRUyU476qqs kS41e5h71jJLrd3a3DCAXlozCjCfMVWrrxMG2418qC7qxNoFeRZ+cr39PJzXhuIsQhSarm5OuXTCt UktoQti5EW6KTZ83iO+h3Tfc61N06/n5bRfp3Lxu2yizLKYk8KqsDIaTrL/fjKb4IuFGSaaSjQUwT RmZnBy10Sq60H9WqL7DHP+ASkj6mtUJjFrekTPXKKHRTUTuFTJQxWhD0utjqn8XLwrFYfhY6hUjw/ S+vTbMrA==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqqrD-00Bq3d-JY; Tue, 17 May 2022 06:38:59 +0000 Date: Mon, 16 May 2022 23:38:59 -0700 From: Christoph Hellwig To: Vasily Averin Cc: Jan Kara , Alexander Viro , kernel@openvz.org, linux-kernel@vger.kernel.org, Amir Goldstein , Matthew Bobrowski , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] sparse: use force attribute for fmode_t casts Message-ID: References: <1eb3b298-4f7e-32ad-74ae-12044ed637ed@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1eb3b298-4f7e-32ad-74ae-12044ed637ed@openvz.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Please just use __FMODE_NONOTIFY instead, which might be a bit misnamed, but was added exactly for this kind of use. And remember once more: __force casts are a massive code smell. Never add them before thinking hard about them and adding a comment explaining why they can't be avoided, preferably in a dedicated helper.