From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752724AbbLFAMT (ORCPT ); Sat, 5 Dec 2015 19:12:19 -0500 Received: from smtprelay0023.hostedemail.com ([216.40.44.23]:50843 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752064AbbLFAMS (ORCPT ); Sat, 5 Dec 2015 19:12:18 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:355:379:541:599:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1537:1567:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:5007:6261:7903:10004:10400:10848:11232:11658:11914:12048:12517:12519:12740:13069:13311:13357:14659:21080:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: fly32_6b20144040232 X-Filterd-Recvd-Size: 1420 Message-ID: <1449360735.20344.6.camel@perches.com> Subject: Re: [PATCH] staging: speakup: kobjects.c: fix char argument to %02x From: Joe Perches To: Rasmus Villemoes , William Hubbs , Chris Brannon , Kirk Reiser , Samuel Thibault , Greg Kroah-Hartman Cc: speakup@linux-speakup.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Date: Sat, 05 Dec 2015 16:12:15 -0800 In-Reply-To: <1449360347-20089-1-git-send-email-linux@rasmusvillemoes.dk> References: <1449360347-20089-1-git-send-email-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.2-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2015-12-06 at 01:05 +0100, Rasmus Villemoes wrote: > If char is signed and ch happens to be negative, printing ch with > "%02x" will not do as intended (when ch is -19, one will get > "ffffffed"). Fix that by masking with 0xff. I presume there are a lot of these in the kernel. Did you use a tool to find this or just inspection?