From patchwork Sat Apr 18 18:41:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 207936 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=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 B46A7C352BE for ; Sat, 18 Apr 2020 18:42:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 979F0221E9 for ; Sat, 18 Apr 2020 18:42:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="j5q/SQ1+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728164AbgDRSl6 (ORCPT ); Sat, 18 Apr 2020 14:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727936AbgDRSlV (ORCPT ); Sat, 18 Apr 2020 14:41:21 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C45C061A0C; Sat, 18 Apr 2020 11:41:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=RAwgh7dK6Aq2GUmD2z2q67RSpKe0Qba5fsNnenVzxMI=; b=j5q/SQ1+k3/+/NWSTV/WCIkHyr zch6FAcwYZsrW1PmSwaW8sUH6ZWeOC45ea2Cw5ovOtRwJLJOkQhRg13tWis5r+icV/DhjmdEjwv79 s2h+fCIcRl3RnLCdtSGFczimDTd9m/8AzLPWV2hp+UzgF8z2XnH0R/f/a5DQg9nNd3Y73Ad9ZrO4P SE8YtJq+oauVuVNS6MyEi2RLVp6TVtw40sWJHw1JEOXlVu7aGBz0X1bug3Vw49BLE3fO57MGGN/q0 Pmq5oXAMF6sIRcv8GgeZALDInNNSJ4NKJzYxSO84gAsonX87pABbmdSy94HL9m+wa0jkyxTrzud66 2h6YWfaA==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jPsP3-0007rZ-5p; Sat, 18 Apr 2020 18:41:21 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Linus Torvalds , Andrew Morton , Alexander Viro , linux-fsdevel@vger.kernel.org, Dmitry Torokhov , linux-input@vger.kernel.org, Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , linux-nfs@vger.kernel.org, Johannes Berg , Dan Williams , Vishal Verma , Dave Jiang , linux-nvdimm@lists.01.org, "Martin K. Petersen" , linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, Zzy Wysm Subject: [PATCH 8/9] dax: fix empty-body warnings in bus.c Date: Sat, 18 Apr 2020 11:41:10 -0700 Message-Id: <20200418184111.13401-9-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200418184111.13401-1-rdunlap@infradead.org> References: <20200418184111.13401-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Fix gcc empty-body warning when -Wextra is used: ../drivers/dax/bus.c:93:27: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../drivers/dax/bus.c:98:29: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Signed-off-by: Randy Dunlap Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: linux-nvdimm@lists.01.org Cc: Linus Torvalds Cc: Andrew Morton --- drivers/dax/bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- linux-next-20200417.orig/drivers/dax/bus.c +++ linux-next-20200417/drivers/dax/bus.c @@ -2,6 +2,7 @@ /* Copyright(c) 2017-2018 Intel Corporation. All rights reserved. */ #include #include +#include #include #include #include @@ -90,12 +91,12 @@ static ssize_t do_id_store(struct device } else rc = -ENOMEM; } else - /* nothing to remove */; + do_empty(); /* nothing to remove */ } else if (action == ID_REMOVE) { list_del(&dax_id->list); kfree(dax_id); } else - /* dax_id already added */; + do_empty(); /* dax_id already added */ mutex_unlock(&dax_bus_lock); if (rc < 0)