From patchwork Wed Dec 5 14:23:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 10714261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2966B15A6 for ; Wed, 5 Dec 2018 14:23:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F310F2D25E for ; Wed, 5 Dec 2018 14:23:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E7C5B2D088; Wed, 5 Dec 2018 14:23:15 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 8CC5B2D088 for ; Wed, 5 Dec 2018 14:23:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727505AbeLEOXO (ORCPT ); Wed, 5 Dec 2018 09:23:14 -0500 Received: from mx2.suse.de ([195.135.220.15]:46004 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727297AbeLEOXO (ORCPT ); Wed, 5 Dec 2018 09:23:14 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CF629ACC2 for ; Wed, 5 Dec 2018 14:23:12 +0000 (UTC) From: Johannes Thumshirn To: David Sterba Cc: Linux BTRFS Mailinglist , Johannes Thumshirn Subject: [PATCH 0/3] btrfs: use offset_in_page and PAGE_ALIGNED Date: Wed, 5 Dec 2018 15:23:02 +0100 Message-Id: <20181205142305.15361-1-jthumshirn@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the offset_in_page() and PAGE_ALIGNED() macros instead of open-coding them throughout btrfs. This series also includes a patch for 'make coccicheck' which is marked as an RFC and I've CCed Julia in the hoping to get input from her. Johannes Thumshirn (3): btrfs: use offset_in_page instead of open-coding it btrfs: use PAGE_ALIGNED instead of open-coding it coccinelle: api: add offset_in_page.cocci fs/btrfs/check-integrity.c | 20 +++---- fs/btrfs/compression.c | 4 +- fs/btrfs/extent_io.c | 53 +++++++++---------- fs/btrfs/file.c | 4 +- fs/btrfs/inode.c | 9 ++-- fs/btrfs/send.c | 2 +- fs/btrfs/volumes.c | 2 +- scripts/coccinelle/api/offset_in_page.cocci | 81 +++++++++++++++++++++++++++++ 8 files changed, 125 insertions(+), 50 deletions(-) create mode 100644 scripts/coccinelle/api/offset_in_page.cocci