Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3665878imm; Tue, 29 May 2018 11:10:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpri3p8JaE0V2J3QAHY/ikYKY2bv+COUzTx9nHbEawqhgKCKge+f7EpqCEPRAKNVmKQuKSh X-Received: by 2002:a62:404f:: with SMTP id n76-v6mr18429650pfa.185.1527617443524; Tue, 29 May 2018 11:10:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527617443; cv=none; d=google.com; s=arc-20160816; b=aQbJQ+NAv96AuaxEEWtN/lE3WupWdGRdw8kHH5ZXESJB793PShjAJvjs2OvRZI/GQE +kKNrEBcbUkHy9AtcXWSBfDim0e2zyBd+454PpA2VcttFI+3+Q6rQFqvhuuJ8IJtx+Lk uck4zppPIZMZPicmxik1lM2l8J07/Ca9wu1UHk3JObiqNkbDVvUY0f9gvlAKVU5Dkd4c 4vKXOcXR1WmsMCHutw5ZN4jshM4F/he2tW8lIz/Xk+KzmssO2OJJHryZeHe8IpbvxuEp WUkeFW4YupUKUgOaW20INYmdF1CmhXphE7t0B8JE6kvO3Fx5/S1dXDJEfFr+cfYhe6YD cjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=I2OBo5yksH/JESCNo6bFuIM1hbCm9Oucy1TU68vaOPg=; b=b///u4be0NGXYNzOrCFT3Po0C8Fkl+T3pIon0KMs43gjAZUZCLMtlaoX02O23wkH7I fjumTKlMIgHbUYYng1rwVu2DyXIpNuhckKvXeQ6gRXz/3nwbRURC/NNoZZQ+LZ0UOaa+ OG+qLpAY25w47lEBxolygjziivibSqhhxMZvsyNYT7MiIrHVMlP/+zUpYgSWUwhw77uq uCMjjmLRz4IiYHOcJBslANVhkJCURaBaKCJ5uZvihn1WJC7JN1QtoRjo2lZTS7LrIi96 1l0dnuePOpRv2WuqYZdVriIiBDMO+P5dQ0eMM6gxYJi2FMGsMd5nqdbfMor2NiKLbAz9 +YHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f21-v6si25509635pgv.382.2018.05.29.11.10.29; Tue, 29 May 2018 11:10:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966086AbeE2SJa (ORCPT + 99 others); Tue, 29 May 2018 14:09:30 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34392 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965678AbeE2SJ1 (ORCPT ); Tue, 29 May 2018 14:09:27 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 51DEA40122A3; Tue, 29 May 2018 18:09:27 +0000 (UTC) Received: from localhost (unknown [10.18.25.149]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3016F2156A38; Tue, 29 May 2018 18:09:27 +0000 (UTC) Date: Tue, 29 May 2018 14:09:26 -0400 From: Mike Snitzer To: Arnd Bergmann Cc: Alasdair Kergon , dm-devel@redhat.com, Mikulas Patocka , linux-kernel@vger.kernel.org Subject: Re: dm: writecache: fix format string warning Message-ID: <20180529180926.GC32763@redhat.com> References: <20180528155432.2864616-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180528155432.2864616-1-arnd@arndb.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 29 May 2018 18:09:27 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Tue, 29 May 2018 18:09:27 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'msnitzer@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 28 2018 at 11:54am -0400, Arnd Bergmann wrote: > The return type of ACCESS_ONCE is configuration dependent and may be either > 'int' or 'long int' for the writecache_has_error() macro, so we get a warning > like this for either format string: > > In file included from drivers/md/dm-writecache.c:8: > drivers/md/dm-writecache.c: In function 'writecache_status': > drivers/md/dm-writecache.c:2227:10: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'int' [-Werror=format=] > DMEMIT("%ld %llu %llu %llu", writecache_has_error(wc), > ^~~~~~~~~~~~~~~~~~~~ > include/linux/device-mapper.h:549:46: note: in definition of macro 'DMEMIT' > 0 : scnprintf(result + sz, maxlen - sz, x)) > ^ > > The code is otherwise correct, so we just need to shut up the warning, > which can be done using an extra type cast. > > Fixes: bb15b431d650 ("dm: add writecache target") > Signed-off-by: Arnd Bergmann Thanks, I've picked this up.