From patchwork Fri Jan 6 20:53:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 9501839 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 2EE7F6021C for ; Fri, 6 Jan 2017 20:57:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23B8528526 for ; Fri, 6 Jan 2017 20:57:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18B2228528; Fri, 6 Jan 2017 20:57:57 +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=unavailable 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 C0EB328526 for ; Fri, 6 Jan 2017 20:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161717AbdAFUyV (ORCPT ); Fri, 6 Jan 2017 15:54:21 -0500 Received: from mailrelay112.isp.belgacom.be ([195.238.20.139]:39649 "EHLO mailrelay112.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161631AbdAFUyJ (ORCPT ); Fri, 6 Jan 2017 15:54:09 -0500 X-Belgacom-Dynamic: yes X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2AlBwADA3BY/2ZisVteHQEFAQsBgzkBA?= =?us-ascii?q?QEBAR9AgSuOSZFWAZJwgg+CCYYiAoFVQRMBAgEBAQEBAQFjKIRpBicvIxAZJhI?= =?us-ascii?q?5HgYTiGMRsjQ6ih8BAQEHKIZFjw0FiHKSI5FHApBZSJIJIQI0gSEYGIReHIFgP?= =?us-ascii?q?TWIZgEBAQ?= X-IPAS-Result: =?us-ascii?q?A2AlBwADA3BY/2ZisVteHQEFAQsBgzkBAQEBAR9AgSuOSZF?= =?us-ascii?q?WAZJwgg+CCYYiAoFVQRMBAgEBAQEBAQFjKIRpBicvIxAZJhI5HgYTiGMRsjQ6i?= =?us-ascii?q?h8BAQEHKIZFjw0FiHKSI5FHApBZSJIJIQI0gSEYGIReHIFgPTWIZgEBAQ?= Received: from 102.98-177-91.adsl-dyn.isp.belgacom.be (HELO inkjet2.lan) ([91.177.98.102]) by relay.skynet.be with ESMTP; 06 Jan 2017 21:54:08 +0100 From: Fabian Frederick To: Jan Kara Cc: fabf@skynet.be, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: [PATCH 02/12 linux-next] udf: use pointer for kernel_long_ad argument Date: Fri, 6 Jan 2017 21:53:50 +0100 Message-Id: <1483736037-25111-3-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1483736037-25111-1-git-send-email-fabf@skynet.be> References: <1483736037-25111-1-git-send-email-fabf@skynet.be> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Having struct kernel_long_ad laarr[EXTENT_MERGE_SIZE] in all function arguments could be understood as by-value parameter. Use kernel_long_ad pointer for functions depending on inode_getblk() Signed-off-by: Fabian Frederick --- fs/udf/inode.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/fs/udf/inode.c b/fs/udf/inode.c index bab40e7..4a7813b 100644 --- a/fs/udf/inode.c +++ b/fs/udf/inode.c @@ -57,14 +57,12 @@ static sector_t inode_getblk(struct inode *, sector_t, int *, int *); static int8_t udf_insert_aext(struct inode *, struct extent_position, struct kernel_lb_addr, uint32_t); static void udf_split_extents(struct inode *, int *, int, int, - struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); + struct kernel_long_ad *, int *); static void udf_prealloc_extents(struct inode *, int, int, - struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); -static void udf_merge_extents(struct inode *, - struct kernel_long_ad[EXTENT_MERGE_SIZE], int *); -static void udf_update_extents(struct inode *, - struct kernel_long_ad[EXTENT_MERGE_SIZE], int, int, - struct extent_position *); + struct kernel_long_ad *, int *); +static void udf_merge_extents(struct inode *, struct kernel_long_ad *, int *); +static void udf_update_extents(struct inode *, struct kernel_long_ad *, int, + int, struct extent_position *); static int udf_get_block(struct inode *, sector_t, struct buffer_head *, int); static void __udf_clear_extent_cache(struct inode *inode) @@ -896,8 +894,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block, } static void udf_split_extents(struct inode *inode, int *c, int offset, - int newblocknum, - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], + int newblocknum, struct kernel_long_ad *laarr, int *endnum) { unsigned long blocksize = inode->i_sb->s_blocksize; @@ -961,7 +958,7 @@ static void udf_split_extents(struct inode *inode, int *c, int offset, } static void udf_prealloc_extents(struct inode *inode, int c, int lastblock, - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], + struct kernel_long_ad *laarr, int *endnum) { int start, length = 0, currlength = 0, i; @@ -1056,8 +1053,7 @@ static void udf_prealloc_extents(struct inode *inode, int c, int lastblock, } } -static void udf_merge_extents(struct inode *inode, - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], +static void udf_merge_extents(struct inode *inode, struct kernel_long_ad *laarr, int *endnum) { int i; @@ -1156,8 +1152,7 @@ static void udf_merge_extents(struct inode *inode, } } -static void udf_update_extents(struct inode *inode, - struct kernel_long_ad laarr[EXTENT_MERGE_SIZE], +static void udf_update_extents(struct inode *inode, struct kernel_long_ad *laarr, int startnum, int endnum, struct extent_position *epos) {