Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759435Ab0FPTHs (ORCPT ); Wed, 16 Jun 2010 15:07:48 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:54457 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758747Ab0FPTHq (ORCPT ); Wed, 16 Jun 2010 15:07:46 -0400 Message-ID: <4C192113.7030101@vlnb.net> Date: Wed, 16 Jun 2010 23:08:03 +0400 From: Vladislav Bolkhovitin User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: sparclinux@vger.kernel.org CC: Simone Ricci , scst-devel@lists.sourceforge.net, Joe Eykholt , linux-kernel Subject: How to printk/sprintf uint64_t on Sparc without format and argument types mismatch References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V01U2FsdGVkX1+v3XirkF2wF6M/uTDTpJE0hL/4tZxOGIAbbDl bNHp7SqLtuJWgqT2PDJYYBhRtVLagtky7vpIKcp3YjjgOXpUnk wHbdJW79Moamr4Xn5uScw== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 908 Lines: 24 Hello, We in SCST project need to printk/sprintf variables of type uint64_t. Size of those variables is required to be 64-bit integer. On x86 we printk/sprintf them as %lld, but on Sparc we have a compiler warnings like: scst/src/scst_targ.c:2136: warning: format ?%llx? expects type ?long long unsigned int?, but argument 4 has type ?uint64_t?. It is because on Sparc uint64_t defined as unsigned long, but on x86 - as unsigned long long. Sure, we can cast all the cases to unsigned long long, but we wonder, maybe there is a more elegant way to do that without the warning? For instance, like %z for size_t or PRId64 in the user space. Thanks, Vlad -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/