From patchwork Tue Oct 28 01:29:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Fong X-Patchwork-Id: 5167951 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CF9139F349 for ; Tue, 28 Oct 2014 01:33:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0A834201F2 for ; Tue, 28 Oct 2014 01:33:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 106BE201ED for ; Tue, 28 Oct 2014 01:33:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xivcn-0001xn-GA; Tue, 28 Oct 2014 01:31:05 +0000 Received: from mail-pa0-x236.google.com ([2607:f8b0:400e:c03::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xivcj-0001sy-Eg for linux-arm-kernel@lists.infradead.org; Tue, 28 Oct 2014 01:31:02 +0000 Received: by mail-pa0-f54.google.com with SMTP id rd3so6646596pab.13 for ; Mon, 27 Oct 2014 18:30:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=561e9jN0I6k82PXF25pLVEgnYyE+16RwrGAtrVa9Pjk=; b=RJrowpVbAaeI9vBD64a5WoYFVUsqwHgJjzdsVpflgF/hxeX0BWnfbPrqhyOSBqH6oy HgRF0OKwidgYzgd7KkQ87SJQCC/HXPw8+H5F+WqatKG+CJCZcyjjl1ne+IbRQ3z08Kgi BVqQfFUUSG5+lxrYlzrovltgBMNGkKsNbtU1T23By16EXR7dgrifQA+T49J48NChfhhJ P/0wtySTW7UKlj13B3lOonF9TmQbSQHw3uwfosTKBooc06f2+ZkkKLmLMiRdkZ1C3bIB QB5sTfeVT0TjVMGw5ZuQnVNBfqYAEv5PO5DZ7NA24orQBMArX1jf8gEF2onXqzfVJZN2 /8/w== X-Received: by 10.70.10.195 with SMTP id k3mr51320pdb.41.1414459840170; Mon, 27 Oct 2014 18:30:40 -0700 (PDT) Received: from gregory-irv-00.broadcom.com (5520-maca-inet1-outside.broadcom.com. [216.31.211.11]) by mx.google.com with ESMTPSA id iu10sm29229pbd.57.2014.10.27.18.30.38 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 27 Oct 2014 18:30:39 -0700 (PDT) From: Gregory Fong To: Russell King Subject: [PATCH] ARM: Clarify do_div() usage Date: Mon, 27 Oct 2014 18:29:30 -0700 Message-Id: <1414459770-31592-1-git-send-email-gregory.0xf0@gmail.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141027_183101_617419_C092D472 X-CRM114-Status: GOOD ( 11.31 ) X-Spam-Score: -0.6 (/) Cc: Gregory Fong , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The comment above do_div() makes it look like the first argument is supposed to be a pointer to the dividend, so add a note to explain further. Signed-off-by: Gregory Fong --- arch/arm/include/asm/div64.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/include/asm/div64.h b/arch/arm/include/asm/div64.h index 662c7bd..993489f 100644 --- a/arch/arm/include/asm/div64.h +++ b/arch/arm/include/asm/div64.h @@ -14,6 +14,9 @@ * return remainder; * } * + * Note that "*n" does not mean the first argument should be a + * pointer, but rather indicates that the value is modified in-place. + * * In other words, a 64-bit dividend with a 32-bit divisor producing * a 64-bit result and a 32-bit remainder. To accomplish this optimally * we call a special __do_div64 helper with completely non standard