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=-10.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 40F62C4CEC9 for ; Wed, 18 Sep 2019 05:57:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 11194218AE for ; Wed, 18 Sep 2019 05:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568786271; bh=KIOTFHahegG0J33lyBSjGF2HsEMYmMKADeN/A2GZsdM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=LlinLqyX53GYo2FBqfog5+x+T4LssgFBIOsunYxkLYMuR9GYvu8Ex5ppoe2ZMlvze otUPKQqn/rr6E25evfB+lf+VbOMfYG91ycETaJrrO3onUClX/n/MqhnD3FC6G+Rjeg aN/q8jCpRmS3ofpzyzr35BT8WlNxJ430pASJSV8c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726759AbfIRF5s (ORCPT ); Wed, 18 Sep 2019 01:57:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:60472 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725834AbfIRF5s (ORCPT ); Wed, 18 Sep 2019 01:57:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E8207214AF; Wed, 18 Sep 2019 05:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1568786267; bh=KIOTFHahegG0J33lyBSjGF2HsEMYmMKADeN/A2GZsdM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=tpT5yJrvuct7UQk9sGP0z/IslXA5oP29VnvStyZacsto6YRMh746KI0rvk+Xt9QBW 5kM136KqRl4NiXfk1+EDb171LXZzSGSd6CiJswnEEJL7p5hHr/SDF7FI1DA4Tuxr5H 1+40PkVaPOXL5EYtMBGTfdZ979AvbtUpmLrd7BfM= Date: Wed, 18 Sep 2019 07:57:45 +0200 From: Greg Kroah-Hartman To: Nathan Chancellor Cc: Shannon Nelson , Pensando Drivers , "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ionic: Remove unnecessary ternary operator in ionic_debugfs_add_ident Message-ID: <20190918055745.GB1830901@kroah.com> References: <20190917232616.125261-1-natechancellor@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190917232616.125261-1-natechancellor@gmail.com> User-Agent: Mutt/1.12.1 (2019-06-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, Sep 17, 2019 at 04:26:16PM -0700, Nathan Chancellor wrote: > clang warns: > > ../drivers/net/ethernet/pensando/ionic/ionic_debugfs.c:60:37: warning: > expression result unused [-Wunused-value] > ionic, &identity_fops) ? 0 : -EOPNOTSUPP; > ^~~~~~~~~~~ > 1 warning generated. > > The return value of debugfs_create_file does not need to be checked [1] > and the function returns void so get rid of the ternary operator, it is > unnecessary. > > [1]: https://lore.kernel.org/linux-mm/20150815160730.GB25186@kroah.com/ > > Fixes: fbfb8031533c ("ionic: Add hardware init and device commands") > Link: https://github.com/ClangBuiltLinux/linux/issues/658 > Signed-off-by: Nathan Chancellor > --- > drivers/net/ethernet/pensando/ionic/ionic_debugfs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Greg Kroah-Hartman