Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754324AbcLQIfC (ORCPT ); Sat, 17 Dec 2016 03:35:02 -0500 Received: from mail-wj0-f193.google.com ([209.85.210.193]:36031 "EHLO mail-wj0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcLQIfA (ORCPT ); Sat, 17 Dec 2016 03:35:00 -0500 From: Bart Van Assche X-Google-Original-From: Bart Van Assche Subject: Re: [PATCH] scsi: esas2r: Fix format string type mistakes To: Kees Cook , Bradley Grove References: <20161216215030.GA96735@beast> Cc: linux-kernel@vger.kernel.org, "James E.J. Bottomley" , "Martin K. Petersen" , Emese Revfy , linux-scsi@vger.kernel.org Message-ID: <92483e45-c522-f7d5-e10d-9693d2675697@acm.org> Date: Sat, 17 Dec 2016 09:34:57 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20161216215030.GA96735@beast> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 696 Lines: 18 On 12/16/2016 10:50 PM, Kees Cook wrote: > diff --git a/drivers/scsi/esas2r/esas2r_ioctl.c b/drivers/scsi/esas2r/esas2r_ioctl.c > index 3e8483410f61..34976f9a1a10 100644 > --- a/drivers/scsi/esas2r/esas2r_ioctl.c > +++ b/drivers/scsi/esas2r/esas2r_ioctl.c > @@ -1301,7 +1301,7 @@ int esas2r_ioctl_handler(void *hostdata, int cmd, void __user *arg) > ioctl = kzalloc(sizeof(struct atto_express_ioctl), GFP_KERNEL); > if (ioctl == NULL) { > esas2r_log(ESAS2R_LOG_WARN, > - "ioctl_handler kzalloc failed for %d bytes", > + "ioctl_handler kzalloc failed for %lu bytes", > sizeof(struct atto_express_ioctl)); > return -ENOMEM; > } Please use %zu to format size_t. Bart.