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=-5.7 required=3.0 tests=DKIM_ADSP_ALL,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY,USER_AGENT_GIT autolearn=ham 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 BB72FC4332F for ; Sun, 8 Sep 2019 17:35:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95BFA21479 for ; Sun, 8 Sep 2019 17:35:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=valentin-vidic.from.hr header.i=@valentin-vidic.from.hr header.b="lzeynlMN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730466AbfIHRfx (ORCPT ); Sun, 8 Sep 2019 13:35:53 -0400 Received: from valentin-vidic.from.hr ([94.229.67.141]:55337 "EHLO valentin-vidic.from.hr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729996AbfIHRfw (ORCPT ); Sun, 8 Sep 2019 13:35:52 -0400 X-Virus-Scanned: Debian amavisd-new at valentin-vidic.from.hr Received: by valentin-vidic.from.hr (Postfix, from userid 1000) id 244C1214; Sun, 8 Sep 2019 17:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=valentin-vidic.from.hr; s=2017; t=1567964145; bh=g3+HRFguX0QmMKDs1sd8gSFNJsQbfyJNVF5VciLQGko=; h=From:To:Cc:Subject:Date:From; b=lzeynlMNb19jc2n4qitLBQhhTTdjewCArgKv2BpaE/gvbqlfmho4GXnAWlbGSjLkr gFBJUPBoi3QU46dHhcCqQmDKv2wuqoRkUkBYiCcBHUK0aAILoyixkO5RdkPDHOwvQH HSuH+pE3xfk4FqFBpiMnv9my4lOa0MPB5eeg3/c3vQhFWv28IkAnHqeYe4po0kFsyc 74gnQ4DjPbc90REQDF7wkLFHoTyLKbQGGIxjZCybnFF9lyu6HuLOZYBWTOB19OGyU/ QCWxO4G5a+2DggviqTtikXiilmIsIUa4x0xtefG5nbUIaHBq6AjCIQXHLy90pxkhe3 +d7+aXTo43Z2A== From: Valentin Vidic To: Greg Kroah-Hartman Cc: Valdis Kletnieks , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Valentin Vidic Subject: [PATCH v3 1/4] staging: exfat: drop unused function parameter Date: Sun, 8 Sep 2019 17:35:36 +0000 Message-Id: <20190908173539.26963-1-vvidic@valentin-vidic.from.hr> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sbi parameter not used inside the function so remove it. Also cleanup unused variables generated by this change. Signed-off-by: Valentin Vidic --- v2: split up into multiple patches v3: split up some more fix if statement braces add utc offset fields drivers/staging/exfat/exfat_super.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/exfat/exfat_super.c b/drivers/staging/exfat/exfat_super.c index 60dfea73a7a4..3a58907caf7c 100644 --- a/drivers/staging/exfat/exfat_super.c +++ b/drivers/staging/exfat/exfat_super.c @@ -56,8 +56,7 @@ static void exfat_write_super(struct super_block *sb); #define UNIX_SECS_2108 4354819200L /* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */ -static void exfat_time_fat2unix(struct exfat_sb_info *sbi, - struct timespec64 *ts, struct date_time_t *tp) +static void exfat_time_fat2unix(struct timespec64 *ts, struct date_time_t *tp) { ts->tv_sec = mktime64(tp->Year + 1980, tp->Month + 1, tp->Day, tp->Hour, tp->Minute, tp->Second); @@ -66,8 +65,7 @@ static void exfat_time_fat2unix(struct exfat_sb_info *sbi, } /* Convert linear UNIX date to a FAT time/date pair. */ -static void exfat_time_unix2fat(struct exfat_sb_info *sbi, - struct timespec64 *ts, struct date_time_t *tp) +static void exfat_time_unix2fat(struct timespec64 *ts, struct date_time_t *tp) { time64_t second = ts->tv_sec; struct tm tm; @@ -3349,9 +3347,9 @@ static int exfat_fill_inode(struct inode *inode, struct file_id_t *fid) inode->i_blocks = ((i_size_read(inode) + (p_fs->cluster_size - 1)) & ~((loff_t)p_fs->cluster_size - 1)) >> 9; - exfat_time_fat2unix(sbi, &inode->i_mtime, &info.ModifyTimestamp); - exfat_time_fat2unix(sbi, &inode->i_ctime, &info.CreateTimestamp); - exfat_time_fat2unix(sbi, &inode->i_atime, &info.AccessTimestamp); + exfat_time_fat2unix(&inode->i_mtime, &info.ModifyTimestamp); + exfat_time_fat2unix(&inode->i_ctime, &info.CreateTimestamp); + exfat_time_fat2unix(&inode->i_atime, &info.AccessTimestamp); return 0; } @@ -3412,8 +3410,6 @@ static void exfat_destroy_inode(struct inode *inode) static int exfat_write_inode(struct inode *inode, struct writeback_control *wbc) { - struct super_block *sb = inode->i_sb; - struct exfat_sb_info *sbi = EXFAT_SB(sb); struct dir_entry_t info; if (inode->i_ino == EXFAT_ROOT_INO) @@ -3422,9 +3418,9 @@ static int exfat_write_inode(struct inode *inode, struct writeback_control *wbc) info.Attr = exfat_make_attr(inode); info.Size = i_size_read(inode); - exfat_time_unix2fat(sbi, &inode->i_mtime, &info.ModifyTimestamp); - exfat_time_unix2fat(sbi, &inode->i_ctime, &info.CreateTimestamp); - exfat_time_unix2fat(sbi, &inode->i_atime, &info.AccessTimestamp); + exfat_time_unix2fat(&inode->i_mtime, &info.ModifyTimestamp); + exfat_time_unix2fat(&inode->i_ctime, &info.CreateTimestamp); + exfat_time_unix2fat(&inode->i_atime, &info.AccessTimestamp); ffsWriteStat(inode, &info); -- 2.20.1