From patchwork Fri Jun 1 11:10:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10443029 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DE807603D7 for ; Fri, 1 Jun 2018 11:22:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D153928A54 for ; Fri, 1 Jun 2018 11:22:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C618928ACE; Fri, 1 Jun 2018 11:22:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4CF7928A54 for ; Fri, 1 Jun 2018 11:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=Kq4DG6j5sE7xH+m5jn3mi65CXOjoWbdaWo5kJRCAMEc=; b=i5zpKFtrmm5jAGzVMTwwqBSyfJ TUviQ8hvYaP9mK0EHSDBN4Z15MNIxfS8pEwrHGpRZdKctahyukWnQj6RTfLZF2EJye/i8JPLXjB05 eCTAqoohSbDJ3psRfd297H0ntKWwZzY0ahdXvs1SKcQkbXoGuX+aJyO0zxroRB/eUXFoO1U8Gkj6g AmStgZRtsv3d7clHH2KhPJY00wV+9ZuzaQulTkVsqvPNIh30zPBdvzsrgiofbgTIgA/PDxZGf6n3a 7Wpki8pY72RpSCYRcZTEtR5jPE1WOAnzLwAg3/KUPbiXhGaDj81enyzp62x6PvBSfPa4bIJzP4Sjc TiumNBzg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOi8x-0004di-9S; Fri, 01 Jun 2018 11:22:51 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOi81-000400-EM; Fri, 01 Jun 2018 11:21:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=MInhr3aFEVO6XjBG+Jldg0xawzmJd+D4CPJbmP3CVuc=; b=FiVeWjQSJ82guNkvia5fF8Yb8 JzGCyIgB9rd85COrqg1wFqcOOk2IWpWmqtWboRJDRvZ87kdYl52rUSDCzd3x/f4CUhuWsW5Vyd19N o+kzE8WqjFfDzs+gi+9X6IfdKOUGrklD4esl0HfisdZGS3IcHb8RAA1EiIENGxi8VOyLcc8aLyVmh G2ty7b/JuOXUCK6yZj+pURR13/zSGLAEtc3ScD53bhNQjMUnpATn4OCNSH1qSPfYqVp/Uc/cymIUV joEiUHF/d4Vws7eZxncs/xhG8qFfFrKp0gd6DqH2xdyV9ns7wvorNmFYS0kIAygsmQWMh3xR2a3Xo QxZhBTSSA==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fOhxJ-0005VJ-P5; Fri, 01 Jun 2018 11:10:51 +0000 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (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 E6C29208B8; Fri, 1 Jun 2018 11:10:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527851446; bh=iBcOL02a/g9FGd2b1mDj/D2rzCCH1hVu2Z+AMr6IBZ0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rkeh1H8XIIyeIvG37BEmGPDWysW+S9rssdkt8l7vIuZ6rM6xZ4YnvqK/ec+1N2BX5 J2Zxvl27y9oJ+NHGCoM8hyGqtf7aCa+aP3Y2p/c3qsf1RgoNdaKnKSEU/2vIB4e+0Q JG2MgVkfzxM2Q9ndNuUtBBX3C2oHBz5CBLBHGTvM= From: Greg Kroah-Hartman To: devel@driverdev.osuosl.org Subject: [PATCH 5/6] staging: vc04_services: vchiq_debugfs_log_entry can be a void * Date: Fri, 1 Jun 2018 13:10:03 +0200 Message-Id: <20180601111004.1670-5-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180601111004.1670-1-gregkh@linuxfoundation.org> References: <20180601111004.1670-1-gregkh@linuxfoundation.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180601_121050_040371_17A698F3 X-CRM114-Status: GOOD ( 15.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Wahren , Kees Cook , Arnd Bergmann , Greg Kroah-Hartman , Keerthi Reddy , linux-rpi-kernel@lists.infradead.org, Dan Carpenter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There's no need to set this to be int * when it is only used as a void *. This lets us remove the unneeded cast, and unneeded temporary variable the one place it is referenced in the code. Suggested-by: Eric Anholt Cc: Stefan Wahren Cc: Kees Cook Cc: Dan Carpenter Cc: Arnd Bergmann Cc: Keerthi Reddy Cc: linux-rpi-kernel@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Greg Kroah-Hartman --- .../vc04_services/interface/vchiq_arm/vchiq_debugfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c index f18cd56c3634..2b353d2d25ce 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_debugfs.c @@ -58,7 +58,7 @@ struct dentry *vchiq_dbg_clients; /* Log category debugfs entries */ struct vchiq_debugfs_log_entry { const char *name; - int *plevel; + void *plevel; struct dentry *dir; }; @@ -153,10 +153,10 @@ static void vchiq_debugfs_create_log_entries(struct dentry *top) dir = debugfs_create_dir("log", vchiq_dbg_dir); for (i = 0; i < n_log_entries; i++) { - void *levp = (void *)vchiq_debugfs_log_entries[i].plevel; - dir = debugfs_create_file(vchiq_debugfs_log_entries[i].name, - 0644, dir, levp, &debugfs_log_fops); + 0644, dir, + vchiq_debugfs_log_entries[i].plevel, + &debugfs_log_fops); vchiq_debugfs_log_entries[i].dir = dir; } }