From patchwork Fri Sep 16 01:52:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9334977 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 9BB26607FD for ; Fri, 16 Sep 2016 01:54:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 85B8929E66 for ; Fri, 16 Sep 2016 01:54:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 78E4829EA8; Fri, 16 Sep 2016 01:54:09 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 101AB29E66 for ; Fri, 16 Sep 2016 01:54:08 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkiKR-0003IJ-8r; Fri, 16 Sep 2016 01:52:35 +0000 Received: from mail-pa0-x243.google.com ([2607:f8b0:400e:c03::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bkiKN-0003EP-KL for linux-arm-kernel@lists.infradead.org; Fri, 16 Sep 2016 01:52:32 +0000 Received: by mail-pa0-x243.google.com with SMTP id vz6so2806794pab.1 for ; Thu, 15 Sep 2016 18:52:11 -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:mime-version :content-transfer-encoding; bh=4YKGCd9hfio4ZEp66l92/LGjlZk6PHnOHVPk2xS+I64=; b=APs7FGN6vJ64aWY/AMhqOZZyBG6IQ/6StB34H+eFiTSxfozUJLOfTAZrqI8bQ9KhvO yVCZPuxUTn20zEMSCSXOcwZDyHrUAHkjCuQvKgwZ3bcmRUzFb1sKrBJAlFtZsZKwO9Tf VrW7JVQBbKxT1mUtnp8oHWuw7XCT68kcdiZEFlexnvX74A0y/uloUQv3LRk7mw6hxlkt mjjwW8j8ncNVnQN2YQqF0yrW+NVfMsJ+CX3zfiQ5JwSwxM8t5pbGBFdoIMsm/Y+hBHOj pwm7anAYtBEg0GAEw75b+Ub0BvhIpZGZa/gFR79+Yrg4e6Gpcv45CdeGucrlDO34HKb9 Jeeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4YKGCd9hfio4ZEp66l92/LGjlZk6PHnOHVPk2xS+I64=; b=Jl/Zy7qSW2RXI7ekzz1KVRjQ2FmvI6RQU6MxPJu3nyKdJ0doWEF2rSQESKKzrnBXHL YWG7yhBRRIIlQ419tVH3DeImX25AUYeTxjkRQkn8Oe5PIOOyKVO9ssZGRfyAALylgoM9 VVxGETppNrdsLQZFE+KtVn6LNBOXdNnMRKT2zqg7VNoJ5usO+y4ykAlyzYxqnW8i2/h9 cVwLJp4WobYxTNrkw0wy3BDbvP/2RC4rj0iN23IcQIZ0Pe7k/Lh3MAnYqSV3mZYnXdtp xSzFQHB104KL6aWlh3B0DmN9Jd6h8I0eHEGNaryO7YsXTNGi1S3jv5Or5Tq+sssPSVnx nxmw== X-Gm-Message-State: AE9vXwPVigRh+i0iGsROYJV3YaRQitwLRIZFbT8SMrZTqkXgz+jzvIWMEBBXrK+IwStFig== X-Received: by 10.67.3.38 with SMTP id bt6mr19446072pad.86.1473990730929; Thu, 15 Sep 2016 18:52:10 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id ae7sm7694322pac.19.2016.09.15.18.52.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Sep 2016 18:52:10 -0700 (PDT) From: Wei Yongjun To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Russell King , Arnd Bergmann Subject: [PATCH -next] dma: mv_xor: fix invalid use of sizeof in orion_ge00_switch_init() Date: Fri, 16 Sep 2016 01:52:00 +0000 Message-Id: <1473990720-20605-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160915_185231_743277_3CDDA947 X-CRM114-Status: GOOD ( 10.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wei Yongjun , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Fixes: fe158a17c1e0 ("ARM: orion: simplify orion_ge00_switch_init") Signed-off-by: Wei Yongjun --- arch/arm/plat-orion/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index 272f49b..23a975a 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c @@ -478,7 +478,7 @@ void __init orion_ge00_switch_init(struct dsa_platform_data *d) for (i = 0; i < d->nr_chips; i++) d->chip[i].host_dev = &orion_ge_mvmdio.dev; - platform_device_register_data(NULL, "dsa", 0, d, sizeof(d)); + platform_device_register_data(NULL, "dsa", 0, d, sizeof(*d)); } /*****************************************************************************