From patchwork Sun Sep 11 19:22:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Winkler, Tomas" X-Patchwork-Id: 9325563 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 B121F60231 for ; Sun, 11 Sep 2016 19:24:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A67D28B0D for ; Sun, 11 Sep 2016 19:24:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B6F928B0F; Sun, 11 Sep 2016 19:24:25 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8583328B0D for ; Sun, 11 Sep 2016 19:24:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bjAMY-0007mp-7D; Sun, 11 Sep 2016 19:24:22 +0000 Received: from sog-mx-1.v43.ch3.sourceforge.com ([172.29.43.191] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bjAMX-0007mk-1c for tpmdd-devel@lists.sourceforge.net; Sun, 11 Sep 2016 19:24:21 +0000 Received-SPF: pass (sog-mx-1.v43.ch3.sourceforge.com: domain of intel.com designates 192.55.52.93 as permitted sender) client-ip=192.55.52.93; envelope-from=tomas.winkler@intel.com; helo=mga11.intel.com; Received: from mga11.intel.com ([192.55.52.93]) by sog-mx-1.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1bjAMW-0008Lh-1k for tpmdd-devel@lists.sourceforge.net; Sun, 11 Sep 2016 19:24:21 +0000 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP; 11 Sep 2016 12:24:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,318,1470726000"; d="scan'208";a="7599762" Received: from twinkler-lnx.jer.intel.com ([10.12.87.167]) by orsmga004.jf.intel.com with ESMTP; 11 Sep 2016 12:24:12 -0700 From: Tomas Winkler To: tpmdd-devel@lists.sourceforge.net, Jason Gunthorpe , Jarkko Sakkinen Date: Sun, 11 Sep 2016 22:22:10 +0300 Message-Id: <1473621730-23125-1-git-send-email-tomas.winkler@intel.com> X-Mailer: git-send-email 2.7.4 X-Headers-End: 1bjAMW-0008Lh-1k Subject: [tpmdd-devel] [PATCH 1/1] tpm/tpm-dev: fix broken style in copy_from_user X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net X-Virus-Scanned: ClamAV using ClamSMTP Straighten unneeded line brake and drop useless cast to void. Signed-off-by: Tomas Winkler Acked-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/char/tpm/tpm-dev.c b/drivers/char/tpm/tpm-dev.c index 912ad30be585..9782df406345 100644 --- a/drivers/char/tpm/tpm-dev.c +++ b/drivers/char/tpm/tpm-dev.c @@ -130,8 +130,7 @@ static ssize_t tpm_write(struct file *file, const char __user *buf, mutex_lock(&priv->buffer_mutex); - if (copy_from_user - (priv->data_buffer, (void __user *) buf, in_size)) { + if (copy_from_user(priv->data_buffer, buf, in_size)) { mutex_unlock(&priv->buffer_mutex); return -EFAULT; }