From patchwork Wed Jan 17 13:18:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 862258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k+NPdYEr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zM72q55S9z9s7f for ; Thu, 18 Jan 2018 00:18:59 +1100 (AEDT) Received: from localhost ([::1]:35367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebncH-0004Gx-Qp for incoming@patchwork.ozlabs.org; Wed, 17 Jan 2018 08:18:57 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebnbt-0004GR-A8 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebnbs-0007kd-Cw for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:33 -0500 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:34740) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebnbs-0007kP-9D for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:32 -0500 Received: by mail-qk0-x242.google.com with SMTP id b76so25193527qkc.1 for ; Wed, 17 Jan 2018 05:18:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ywFbl/3gkaX2Nec/gYJmtjnYMtcg4/a1r8QkPlBRw74=; b=k+NPdYErv8rmNmJ1Yc3FBk6MXyerKpK8l9OPI9CbSVbP+tSqfeLEN+MFbLn2eFa+op I15xVHG7St3riwQ7iwIl2KmP2a92M0yuwtRmUqUH5GJujFHGQcM0/B3yhegJL6dZRzBI iK77NH6ON3LoIYFiiaL5PkIEPhaZcgepmJJCfXH92xGICE8f3Awzs+K1xTWRZVy5LN+g QxY8Zr8g3jfjUB+TSdi72v+gr53tmZ0qEQSAHEPtO/UGTyOZTueJqYFD3WkO4061j6PW 1Aa53nKQfuSA2zitTec5j/wTY7/RFGG48V/aHKqRJSM3JQo8gkn2N/g4kly7/21ZeKFZ Ygcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ywFbl/3gkaX2Nec/gYJmtjnYMtcg4/a1r8QkPlBRw74=; b=IgjPfuH6UwtoxSJOKRE1+yNkeCZuq3Jvh+o2RQxR6Guem4/9kKTW2Ia8JIanFiX9bf YtPVhU7UMgbu6lgKTAw5CrlJ4slbb5KKCMyxfFVr1W0xsTW4Xjh+CryBlt6TWnxJd++L WZx0XfhQS4cShF7dnZHKzE6ZHLECpAH/fE1Tl9bs0tTxxVZ3bPYnrFiUePiZ7wDcFGY2 NrVhZ6hXdp66zJartywNQBmlyd4BSsYJh2uNqwEfbVzKWDilA98Vw9ffFEpdg4hxxJo0 Z5sB94sWa5PxJtvGS9k/0aBcDaECukOerHliLV8tZQqxneEX87WahzkHgXWRITglvWiA DLIw== X-Gm-Message-State: AKGB3mLBOjn5g2bB235nITARHMaV3PHS94y0X9GUjqw7xzjuDe1bZxKe QfZQQaMxAcdc0kpvnKG0A5c= X-Google-Smtp-Source: ACJfBotprhTSVTuWCMWuis5LNgp9aibLujeX7PNmbS/qgCRaF8BmUh37tQ1xfRPC9lhPDq5rBneMNw== X-Received: by 10.55.195.69 with SMTP id a66mr57494000qkj.83.1516195111819; Wed, 17 Jan 2018 05:18:31 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id n21sm2990418qtl.38.2018.01.17.05.18.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 05:18:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Wed, 17 Jan 2018 10:18:19 -0300 Message-Id: <20180117131821.18700-2-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180117131821.18700-1-f4bug@amsat.org> References: <20180117131821.18700-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [RFC PATCH 1/3] compiler: add QEMU_WARN_NONNULL_ARGS() 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: , Cc: Peter Maydell , qemu-devel@nongnu.org, Stefan Weil , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Luiz Capitulino , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/compiler.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h index 340e5fdc09..d9b2489391 100644 --- a/include/qemu/compiler.h +++ b/include/qemu/compiler.h @@ -26,6 +26,8 @@ #define QEMU_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) +#define QEMU_WARN_NONNULL_ARGS(args...) __attribute__((nonnull(args))) + #define QEMU_SENTINEL __attribute__((sentinel)) #if QEMU_GNUC_PREREQ(4, 3) From patchwork Wed Jan 17 13:18:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 862261 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="o7GYuQWt"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zM77f5cwjz9s7f for ; Thu, 18 Jan 2018 00:23:10 +1100 (AEDT) Received: from localhost ([::1]:35545 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebngJ-0007Ga-Sz for incoming@patchwork.ozlabs.org; Wed, 17 Jan 2018 08:23:07 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebnbz-0004K8-D9 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebnbv-0007p0-J5 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:39 -0500 Received: from mail-qk0-x242.google.com ([2607:f8b0:400d:c09::242]:38241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebnbv-0007oL-FL for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:35 -0500 Received: by mail-qk0-x242.google.com with SMTP id j185so25164502qkc.5 for ; Wed, 17 Jan 2018 05:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NEve/gPrFz9IBkUuO+1YCE7HIvq06wDt3mbBSgNb4Pc=; b=o7GYuQWt+EJbCY3eKRlJ8xdz5/QYKvjA4tV+jSVopGYjjO6UVtpDF4roRRThR9d5Qa wP1Z+gXPO6Czd5WP+arB5bszmb5aZqps6BcLk8hDqyuf8CfSgGejkAv+tBHg2jQMVhel 6T74HLmjDCi5JxEKhJAQ4bdtjft7U97858mlxcIeNYymeXaRmqhBazXVW8Bmm+HyvfoU 497E6vkbSRCgjVnvEzx/B4gW6VJpqdgiOt6QINJPMv19fFhM5Y6MabyOenQA3ZENS/xZ GQXp0275YoY04IEzjKdjI/CTJ7cuPyXNfSprIj0kuTZ1ERaS6OBzi/nUUY3E3iWhBzHH k/dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NEve/gPrFz9IBkUuO+1YCE7HIvq06wDt3mbBSgNb4Pc=; b=caXBKhM7IeSBRN8DkaPrfhql81GJq5yb+ddNUiVhyZtZsQLALpc1k2jmgdD4t/h8zd wSod6hbANQWNWc3hk8UaIBEVCmn5kxZK2THdsKd1vMXln0Q+JfFD6rj/ak4HqF7ihB1c 5w+MLEfD466qATsTpeY+wkrlPZsOoeBbgS/kpRpQOgFkyP07/ZTysViRM8ARDMDzjaeT zUkeT4609f7NQw+7yVPsXQx6J/lwp23Irp2B30GFaaH0h7O8Bwvn1JgSs/7eaxKU0TqL nySiMqBWBNlE4Qf6AJI00PWx1nDQIx3C5RE9jX8VAxahU9H9wmGQYJCszrayMqaChHe5 4l7g== X-Gm-Message-State: AKwxytcl95oGbNrsj9xwpuHXWJsbMXm6ijK/pJmJ2l80n12eQm8+LWck Wj/+3dSNBB8jqEeryiVwTTQ= X-Google-Smtp-Source: ACJfBouBT7sutbRA0GI9A+ix18ZHuBkpE/5Tj89zcdvK04mmmWy7DofjefjZH1bH3iM8STNGcm+2YQ== X-Received: by 10.55.166.206 with SMTP id p197mr38930836qke.128.1516195115082; Wed, 17 Jan 2018 05:18:35 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id n21sm2990418qtl.38.2018.01.17.05.18.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 05:18:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Wed, 17 Jan 2018 10:18:20 -0300 Message-Id: <20180117131821.18700-3-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180117131821.18700-1-f4bug@amsat.org> References: <20180117131821.18700-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::242 Subject: [Qemu-devel] [RFC PATCH 2/3] virtio: let virtio_add/clear_feature() use QEMU_WARN_NONNULL_ARGS() 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: , Cc: Peter Maydell , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Stefan Weil , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Luiz Capitulino , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- include/hw/virtio/virtio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index 098bdaaea3..d63be28039 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -292,12 +292,14 @@ void virtio_queue_aio_set_host_notifier_handler(VirtQueue *vq, AioContext *ctx, VirtQueue *virtio_vector_first_queue(VirtIODevice *vdev, uint16_t vector); VirtQueue *virtio_vector_next_queue(VirtQueue *vq); +QEMU_WARN_NONNULL_ARGS(1) static inline void virtio_add_feature(uint64_t *features, unsigned int fbit) { assert(fbit < 64); *features |= (1ULL << fbit); } +QEMU_WARN_NONNULL_ARGS(1) static inline void virtio_clear_feature(uint64_t *features, unsigned int fbit) { assert(fbit < 64); From patchwork Wed Jan 17 13:18:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 862259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="MASjOlWD"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zM73H08Pjz9s7f for ; Thu, 18 Jan 2018 00:19:23 +1100 (AEDT) Received: from localhost ([::1]:35374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebncf-0004Pr-31 for incoming@patchwork.ozlabs.org; Wed, 17 Jan 2018 08:19:21 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebnc4-0004OY-Ln for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebnbz-0007wM-6o for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:44 -0500 Received: from mail-qt0-x244.google.com ([2607:f8b0:400d:c0d::244]:42940) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebnbz-0007vi-2R for qemu-devel@nongnu.org; Wed, 17 Jan 2018 08:18:39 -0500 Received: by mail-qt0-x244.google.com with SMTP id c2so22435847qtn.9 for ; Wed, 17 Jan 2018 05:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=91zEBaurL8QCynPlrU/P2wp4E97BDHmth6R29DF2u20=; b=MASjOlWDaJR3jXH5jNuhfIbaMEbm26++zdyPhAE+rTAj91wPVVCUtHLFyx0SVvUcyl IV2kTivgIGz+im2GiAwcS2E0DdB8s5/TMIUtJFYDV7mRRe4j+3UnSCUwpn6xkYaBTygP Ku4jHQLLdbMGJQFr6XluQC44RD7xbRijiGUgS05xBFLr3tXZ/p1bNr/sArNXIcT7tXKa VbYXs1oSfXRnvWS75P9zZrPCdB9fk1xE4RyR3uMjrbcIoOfp+jREXC+p/0Zsd+yjXVyO NKcS939ernq1z/ayxmBPJvnG9KiFS9qrZ2dGufJ1dui5dkbW7CkHZK+fw0CFpjSiVTPv EE1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=91zEBaurL8QCynPlrU/P2wp4E97BDHmth6R29DF2u20=; b=mKZpL6dMNXsq8S17/z5m/hWeflSd0cEuh3sD4shhzosflGXP8X1z+Ibd0nz3WOX5ie JV/PPXLD8E3niNYH1ZZ32ncqiheLzWa25L2P2sfFM2eVyxr+LH8snb+kp/VWxRdZdwrL kXItqV0WKGHDdXl2qPzCvJpYD7gpqts8GOt5Xv6QGxNSjNG/0/B5QhWPToVjklCyXzqF P1E8fbCqMe/BkUIaC7bSKa+w5aeD8Dk9x0w6rxykI+eTufWqlNSDb433VO+yA5Aw22uY iQTmpaSWx79uUPgms3MeGqjmmiFA0+1fufyYjcUnIn41XMdCQUcXkbF7gfyKb/Othj1d Y6Lg== X-Gm-Message-State: AKwxytfZ5zQFSJZ3HqbsjeHCsEDEPwqv3Y7zwzCnxktzl4uQLQAS8zfu n4s2qq8E78W7lAF0OQRO6Ko= X-Google-Smtp-Source: ACJfBotUj4ywy9T1aVjTL79I28xIqTiSE40Kg0TBaLYNaaFRdt0WAjfQNv70VqyhGNVBWnJ1AvxqGg== X-Received: by 10.237.48.2 with SMTP id 2mr58074794qte.293.1516195118576; Wed, 17 Jan 2018 05:18:38 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id n21sm2990418qtl.38.2018.01.17.05.18.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Jan 2018 05:18:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= Date: Wed, 17 Jan 2018 10:18:21 -0300 Message-Id: <20180117131821.18700-4-f4bug@amsat.org> X-Mailer: git-send-email 2.15.1 In-Reply-To: <20180117131821.18700-1-f4bug@amsat.org> References: <20180117131821.18700-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::244 Subject: [Qemu-devel] [RFC PATCH 3/3] utils: let qemu_find_file() use QEMU_WARN_NONNULL_ARGS() 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: , Cc: Peter Maydell , qemu-devel@nongnu.org, Stefan Weil , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Luiz Capitulino , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 05319b9ddc..337203e7c3 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -134,7 +134,7 @@ const char *qemu_get_vm_name(void); #define QEMU_FILE_TYPE_BIOS 0 #define QEMU_FILE_TYPE_KEYMAP 1 -char *qemu_find_file(int type, const char *name); +char *qemu_find_file(int type, const char *name) QEMU_WARN_NONNULL_ARGS(2); /* OS specific functions */ void os_setup_early_signal_handling(void);