From patchwork Fri Sep 28 04:59:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1516911 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4D306DF283 for ; Fri, 28 Sep 2012 04:59:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315Ab2I1E7R (ORCPT ); Fri, 28 Sep 2012 00:59:17 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:46915 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751259Ab2I1E7R (ORCPT ); Fri, 28 Sep 2012 00:59:17 -0400 Received: by qchd3 with SMTP id d3so1651805qch.19 for ; Thu, 27 Sep 2012 21:59:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=GAwopdvgIx62z1cYpj0QTLwppANAMF4DVhCD+aB8CdQ=; b=FifzGYH/SEC08y5rc3oF3Ld8htX5KMTfRUAZQEaJAaRbdWWnrKsNBaKLhL/f1fnm8w CLVIXfp4Uw3qw8JrMWa0rYp1cnQ+z9D2XkL4ZUzYR7t8eYoKvmlv1vrXRoQ9Vy7SYu4f 1ojIdIwiWZMtKkeZ6a/hRV5rZgPdy840J4rq+SgKip4KemPTxwk09S6zdkGO7heCTp8W CiszZ/9u/lAo3nlSs5tmWn+sZWvKvLRyEYLoijVqpfy7ykZoe7KfAXS5eeBduPQHLHmO NKLs2vFkt7CMT3bYaU0HEw6BeY6T6TYh9x01eGMbHDoz/o+c0Q6YAbQ6189658FFxnCv JwtQ== MIME-Version: 1.0 Received: by 10.229.136.131 with SMTP id r3mr3882944qct.145.1348808356856; Thu, 27 Sep 2012 21:59:16 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Thu, 27 Sep 2012 21:59:16 -0700 (PDT) Date: Fri, 28 Sep 2012 12:59:16 +0800 Message-ID: Subject: [PATCH] ceph: convert to use le32_add_cpu() From: Wei Yongjun To: sage@inktank.com Cc: yongjun_wei@trendmicro.com.cn, ceph-devel@vger.kernel.org Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org From: Wei Yongjun Convert cpu_to_le32(le32_to_cpu(E1) + E2) to use le32_add_cpu(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- fs/ceph/caps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 620daad..3251e9c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1005,7 +1005,7 @@ static void __queue_cap_release(struct ceph_mds_session *session, BUG_ON(msg->front.iov_len + sizeof(*item) > PAGE_CACHE_SIZE); head = msg->front.iov_base; - head->num = cpu_to_le32(le32_to_cpu(head->num) + 1); + le32_add_cpu(&head->num, 1); item = msg->front.iov_base + msg->front.iov_len; item->ino = cpu_to_le64(ino); item->cap_id = cpu_to_le64(cap_id);