From patchwork Mon Oct 12 12:55:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7374761 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5B310BEEA4 for ; Mon, 12 Oct 2015 12:55:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7DA51205AA for ; Mon, 12 Oct 2015 12:55:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EE07204D3 for ; Mon, 12 Oct 2015 12:55:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752173AbbJLMze (ORCPT ); Mon, 12 Oct 2015 08:55:34 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:54670 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752117AbbJLMzc (ORCPT ); Mon, 12 Oct 2015 08:55:32 -0400 Received: from wuerfel.localnet ([149.172.15.242]) by mrelayeu.kundenserver.de (mreue101) with ESMTPSA (Nemesis) id 0LlWhL-1aKxBP18QZ-00bOce; Mon, 12 Oct 2015 14:55:04 +0200 From: Arnd Bergmann To: Andy Gross Cc: Kumar Gala , David Brown , linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Hauke Mehrtens , zajec5@gmail.com Subject: [PATCH] firmware: bcm47xx_nvram: fix typo / build error Date: Mon, 12 Oct 2015 14:55:01 +0200 Message-ID: <8565906.sPkd1C9Bg3@wuerfel> User-Agent: KMail/4.11.5 (Linux/3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hL i2bpoVtkV1w74kuQ Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 change to the new __ioread32_copy() helper used the DIV_ROUND_UP macro incorrectly: drivers/firmware/broadcom/bcm47xx_nvram.c: In function 'nvram_find_and_copy': drivers/firmware/broadcom/bcm47xx_nvram.c:110:30: error: macro "DIV_ROUND_UP" requires 2 arguments, but only 1 given The same commit also changed the behavior of the code in big-endian builds to no longer perform byte swaps, which looks intentional but was not part of the patch description. Signed-off-by: Arnd Bergmann Fixes: 31e2fab1c36b ("FIRMWARE: bcm47xx_nvram: Use __ioread32_copy() instead of open-coding") --- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" 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/drivers/firmware/broadcom/bcm47xx_nvram.c b/drivers/firmware/broadcom/bcm47xx_nvram.c index 8f46e6e394b1..0c2f0a61b0ea 100644 --- a/drivers/firmware/broadcom/bcm47xx_nvram.c +++ b/drivers/firmware/broadcom/bcm47xx_nvram.c @@ -107,7 +107,7 @@ found: } /* proceed reading data after header */ __ioread32_copy(nvram_buf + sizeof(*header), header + 1, - DIV_ROUND_UP(nvram_len / 4)); + DIV_ROUND_UP(nvram_len, 4)); nvram_buf[NVRAM_SPACE - 1] = '\0'; return 0;