From patchwork Sun Aug 7 01:41:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9266197 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE17D60839 for ; Sun, 7 Aug 2016 01:41:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96BAE283DF for ; Sun, 7 Aug 2016 01:41:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B5F02840A; Sun, 7 Aug 2016 01:41:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1E174283DF for ; Sun, 7 Aug 2016 01:41:48 +0000 (UTC) Received: from localhost ([::1]:51122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWD62-0002IG-K7 for patchwork-qemu-devel@patchwork.kernel.org; Sat, 06 Aug 2016 21:41:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWD5m-0002Hw-Ky for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bWD5h-00022P-M2 for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:41:29 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:33745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bWD5h-00021t-HH for qemu-devel@nongnu.org; Sat, 06 Aug 2016 21:41:25 -0400 Received: by mail-yw0-x242.google.com with SMTP id z8so23273008ywa.0 for ; Sat, 06 Aug 2016 18:41:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=Jq6Tl46GPSHhPOlQa3MVJCnrGgcgOWf47+vkTqcYCiU=; b=m296mkh1z0ts5avsuZ3a1OvSJUrDCfS4l0bkIbID6IyghHCi9ScJGTShfIYVha5OwN 46MGgJnb0gMHCCg+/o4go84ZsKyILCXUgDMD9qOalzTqh4rxAJU94ecmAeHUCmLBIVDm oQKH+xLtuSgyDzL49cR0E4q7V6dkAUK3YSw4Mxa6drSBR/9nNGrdsHmhb3gZpR0DO5e0 uitXeljcFDX1pMasxIiWsGZQic4oZbCuganLplVCaygq0sNhMPn1Zgg0PyVsMtMWeHVf SXVpSTwyOtm7XKTl/yp/DpyE0XZpqWa/6XHS752Gc9e9MvRkID3hxllfKOLA3PlW9ije 2REQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=Jq6Tl46GPSHhPOlQa3MVJCnrGgcgOWf47+vkTqcYCiU=; b=HyeanFrdnEWmtOgG5HDxs/j4bzhGVdMiBUHv5B72XAbofVAbJzROt9HN5e7x7SWBN4 yy3+I+/kd14GNMz7dDJfuaclgdgV1QRew0ySTMVRLxwkoTiB6h468b/RuhKwoJXItJAX 6rqwD9I+Crv7v/yFcTUsE9MxDxzX3UN6NKIIOoAH/cKu5TKykxgwc5lj5LL1KfpnPqfs XPXjUqCdHcGHeAaaZ13HzYkXiNp4mYYPO5D6t+wdzjZpajIen/bTGUwcGubXqIT/V514 1cnPcDgqeUDCve8j2Fez/NteXFiBRl9wIviCDHSYd+GuWaysJSrDZKRYGE9T0QiOp56+ 6dFA== X-Gm-Message-State: AEkoout1zQuOukT7CDvwQfEuT/Zf7FrCIqRbByiHXknEoDcaVPkmft/MBXdmdOd6zT/mkw== X-Received: by 10.129.88.2 with SMTP id m2mr64575990ywb.236.1470534083214; Sat, 06 Aug 2016 18:41:23 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id c13sm11114863ywa.19.2016.08.06.18.41.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Aug 2016 18:41:22 -0700 (PDT) From: Pranith Kumar To: Richard Henderson , "Emilio G. Cota" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Sergey Fedorov , Markus Armbruster , qemu-devel@nongnu.org (open list:All patches CC here) Date: Sat, 6 Aug 2016 21:41:21 -0400 Message-Id: <20160807014121.18739-1-bobby.prani@gmail.com> X-Mailer: git-send-email 2.9.2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::242 Subject: [Qemu-devel] [PATCH 1/1] seqlock: Fix warning reg. incompatible cast X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP With the latest clang, we have the following warning. We are not using the const qualifier consistently in other functions. So remove it from the only one that uses it to fix the warning. /home/pranith/devops/code/qemu/include/qemu/seqlock.h:62:21: warning: passing 'typeof (*&sl->sequence) *' (aka 'const unsigned int *') to parameter of type 'unsigned int *' discards qualifier s [-Wincompatible-pointer-types-discards-qualifiers] return unlikely(atomic_read(&sl->sequence) != start); ^~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pranith/devops/code/qemu/include/qemu/atomic.h:58:25: note: expanded from macro 'atomic_read' __atomic_load(ptr, &_val, __ATOMIC_RELAXED); \ ^~~~~ /home/pranith/devops/code/qemu/include/qemu/compiler.h:62:43: note: expanded from macro 'unlikely' #define unlikely(x) __builtin_expect(!!(x), 0) Signed-off-by: Pranith Kumar --- include/qemu/seqlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/seqlock.h b/include/qemu/seqlock.h index 2e2be4c..aa4cf15 100644 --- a/include/qemu/seqlock.h +++ b/include/qemu/seqlock.h @@ -55,7 +55,7 @@ static inline unsigned seqlock_read_begin(QemuSeqLock *sl) return ret & ~1; } -static inline int seqlock_read_retry(const QemuSeqLock *sl, unsigned start) +static inline int seqlock_read_retry(QemuSeqLock *sl, unsigned start) { /* Read other fields before reading final sequence. */ smp_rmb();