From patchwork Wed Nov 30 22:40:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 9455051 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 660316074E for ; Wed, 30 Nov 2016 22:40:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 597D9284A2 for ; Wed, 30 Nov 2016 22:40:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4DEB42849E; Wed, 30 Nov 2016 22:40:52 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE7FF2849E for ; Wed, 30 Nov 2016 22:40:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932580AbcK3Wku (ORCPT ); Wed, 30 Nov 2016 17:40:50 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:35333 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754122AbcK3Wku (ORCPT ); Wed, 30 Nov 2016 17:40:50 -0500 Received: by mail-wm0-f51.google.com with SMTP id a197so281822384wmd.0 for ; Wed, 30 Nov 2016 14:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=W35Z9VzJNUA5SSt8dDvKZsAp0JqqrNY1ICsgE+cIh2g=; b=LlRzZZpIrZRKIGtitwbVJ7jplq6FNRxRt1gERYD7xW8uBCfCxoGcg7FcmAfCv2JTJy 1RF4V7cdQYuUEtLpSpYFrKesOP2Mo6d3OtefTYTLp01dWL15trV/AuSamDP9PeiivKqZ kJ7xZ8/Ar8rm1hK2YqRxrGevo8qJZ7xXAyrzo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=W35Z9VzJNUA5SSt8dDvKZsAp0JqqrNY1ICsgE+cIh2g=; b=mMyO0Ads9WJax5bZvXuhr0lBB4lpIiMrFX6GgC+jq3o0EJYweXzMARqe8f0u21/Qsm /We70uYiNtgNhlvwJgukAaaVhS9sE0Ia91sXEH50nbiEb/+Vw5cQZOTw6UFeGu4t/Bmj VL0iHfqbbBl6lxCcL4ivQCtlydtcgUXFYs0io7yzcWF89f5MCUDYbTcZkxdtgwrUXQfS kVIMESgKelDLQD1qfyXUmMxjh5Al2CfPFSL38AqlpyMt52EB39YzSp4GdK12rofRDm4k HNcy8G76BwbA5tiXb26JAKX8XQVjsW5C9YyPl8QqB+Q7iw/ZgeovPMP0E/S+iGqJXClA HAaA== X-Gm-Message-State: AKaTC02jWScJx4ZpH+yGpbx0AKUspELdGxau6+RZLEGop3q9j3FnduUgv8eDfLvzMBLREg== X-Received: by 10.28.226.7 with SMTP id z7mr32247194wmg.83.1480545648821; Wed, 30 Nov 2016 14:40:48 -0800 (PST) Received: from lvps87-230-87-209.dedicated.hosteurope.de (wildmoose.dk. [87.230.87.209]) by smtp.gmail.com with ESMTPSA id wg8sm75088496wjb.42.2016.11.30.14.40.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Nov 2016 14:40:48 -0800 (PST) From: Rasmus Villemoes To: Steve French Cc: Rasmus Villemoes , linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org Subject: [PATCH] cifs: use %16phN for formatting md5 sum Date: Wed, 30 Nov 2016 23:40:32 +0100 Message-Id: <1480545633-2675-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.4 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Passing a gazillion arguments takes a lot of code: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-253 (-253) Signed-off-by: Rasmus Villemoes Reviewed-by: Pavel Shilovsky --- fs/cifs/link.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/fs/cifs/link.c b/fs/cifs/link.c index d031af8d3d4d..c4d996f78e1c 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c @@ -45,13 +45,8 @@ (CIFS_MF_SYMLINK_LINK_OFFSET + CIFS_MF_SYMLINK_LINK_MAXLEN) #define CIFS_MF_SYMLINK_LEN_FORMAT "XSym\n%04u\n" -#define CIFS_MF_SYMLINK_MD5_FORMAT \ - "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n" -#define CIFS_MF_SYMLINK_MD5_ARGS(md5_hash) \ - md5_hash[0], md5_hash[1], md5_hash[2], md5_hash[3], \ - md5_hash[4], md5_hash[5], md5_hash[6], md5_hash[7], \ - md5_hash[8], md5_hash[9], md5_hash[10], md5_hash[11],\ - md5_hash[12], md5_hash[13], md5_hash[14], md5_hash[15] +#define CIFS_MF_SYMLINK_MD5_FORMAT "%16phN\n" +#define CIFS_MF_SYMLINK_MD5_ARGS(md5_hash) md5_hash static int symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)