From patchwork Fri Feb 6 13:51:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 5791851 Return-Path: X-Original-To: patchwork-linux-input@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 62EA6BF440 for ; Fri, 6 Feb 2015 13:51:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 63F8D201EC for ; Fri, 6 Feb 2015 13:51:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 00E57201DD for ; Fri, 6 Feb 2015 13:51:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754681AbbBFNvr (ORCPT ); Fri, 6 Feb 2015 08:51:47 -0500 Received: from mail-la0-f49.google.com ([209.85.215.49]:42387 "EHLO mail-la0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753641AbbBFNvq (ORCPT ); Fri, 6 Feb 2015 08:51:46 -0500 Received: by labhs14 with SMTP id hs14so1229917lab.9 for ; Fri, 06 Feb 2015 05:51:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id; bh=rrE1akwax8WrBtTMCv2L2Z7YE10+XvtJKv2TrZymxgs=; b=iGoWKZNwFDqiH6XJguSaanzgjfnG6mSe4I0tcSH5iKu1TUy4K6Hk2c3T/wd0fu3Z1S KGgxZIpzT2/54aFrBKswefUIWZvHWXyIFN7CD+BrNwZyaKJmu3uRIhkDlWreDC875gGl pCGzpI6ctoJ6Qcy5Ui3SVC141rrktUpI7ZKDc= 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; bh=rrE1akwax8WrBtTMCv2L2Z7YE10+XvtJKv2TrZymxgs=; b=Q8eyo4o+d1zr49iJh0Q2z6fKEYWJ1PPN6PmZyr95ObVGdnoZScdR0AGf3izsjT2cS2 HTPRNa3GU3h+Uytz3d+pFtH7O2mawWFrEpLMZk0qJdq3j0Q4geFZIwwK89QDbw8BEyHS Ax9xKX/jQEXb7n8eK5o3F0eFwKcyK6GjmHnh9EenVxUvz8k+/hejmvw9K5UYv7zKxit3 U1qj1hxggO9TXpjTK0qHK9eu6oWFPiHDkZMy25LMP5/C5Y3JD/2MACiG/3olrPIJgpjy koGRBZaZjsa4dYqFTwAksfq8WWzP7huTDv6FrIqjJjL6zocuqnZCO9XStHP0MoyJVJRf 7Avw== X-Gm-Message-State: ALoCoQluD8MAmMG/yNv2iCcHwoyprlYst2bM4tZM214YHN0rjMKwgNvxdoVTLxWSA39MsHObSj7T X-Received: by 10.152.183.196 with SMTP id eo4mr2896668lac.0.1423230704868; Fri, 06 Feb 2015 05:51:44 -0800 (PST) Received: from spencer.imf.au.dk ([130.225.20.51]) by mx.google.com with ESMTPSA id nb1sm433060lbb.18.2015.02.06.05.51.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 05:51:44 -0800 (PST) From: Rasmus Villemoes To: Dmitry Torokhov Cc: Rasmus Villemoes , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: elan: Fix wrong %p extension Date: Fri, 6 Feb 2015 14:51:13 +0100 Message-Id: <1423230673-25877-1-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.1.3 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,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 There's no %px extension. From the context I think the intention was to dump the five bytes which were not as expected, and for that one should use %ph. Signed-off-by: Rasmus Villemoes --- I think the bug is mostly harmless, since the unrecognized extension is simply ignored (and skipped over), and the address of the 'values' array is simply printed as if by %5p. But since that is an address on the kernel stack, someone might think it is worse than I do. drivers/input/mouse/elan_i2c_smbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/elan_i2c_smbus.c b/drivers/input/mouse/elan_i2c_smbus.c index 359bf8583d54..2a89004f3c6e 100644 --- a/drivers/input/mouse/elan_i2c_smbus.c +++ b/drivers/input/mouse/elan_i2c_smbus.c @@ -71,7 +71,7 @@ static int elan_smbus_initialize(struct i2c_client *client) /* compare hello packet */ if (memcmp(values, check, ETP_SMBUS_HELLOPACKET_LEN)) { - dev_err(&client->dev, "hello packet fail [%*px]\n", + dev_err(&client->dev, "hello packet fail [%*ph]\n", ETP_SMBUS_HELLOPACKET_LEN, values); return -ENXIO; }