From owner-freebsd-net@freebsd.org Fri Jan 13 10:46:28 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9F219CAC4B0; Fri, 13 Jan 2017 10:46:28 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: from mail-oi0-x241.google.com (mail-oi0-x241.google.com [IPv6:2607:f8b0:4003:c06::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 60F351286; Fri, 13 Jan 2017 10:46:28 +0000 (UTC) (envelope-from v.maffione@gmail.com) Received: by mail-oi0-x241.google.com with SMTP id j15so6353183oih.0; Fri, 13 Jan 2017 02:46:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=CKCgPaMpvPjuihq4SbZxBPn/gb78dk+rbH4DYPY70t8=; b=ecteEl8TxgR063WtQ8ZXsHwCS108tIWwsyDzALJ7moz4yoB+OM8sOFJpkUJMlkpH5F UXBBS9CVkuUnahW8DnQfLfs+0Sf1PJOlY6zARGCTXgYgVib+9rfzwUoRMmLH483L2LTe MNrimSVNIhkbVKIzR8V8OWHAj3WCn4StbyTdw3VSRWH7ntS+W5Lnpb6m/7jDmTJpkA7X sJM4AiHCySYL5vkDmIzFaADjJnVmH9O1HHt96QkWbyi7VDf6gYfvXfBP3PHhV9jF74rI QoHbn97Ap53AMCT6F4hI/7u8qvWdB+qeUj3QZvl41bwXjvD8UP4+rYF7gh52ttDY+eJY eWAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=CKCgPaMpvPjuihq4SbZxBPn/gb78dk+rbH4DYPY70t8=; b=Cqsvkem/RwwDHePqoCyVgoGcXES0mzyOJ+ara1DaS/+pQSEgJs7LSfabIvTM545bdh FEOB9kzhCfEHNXCJROvevtMOEC8nCXtaCyYeTn2ZV7PL7Uu9zptnGGI36p58p/V1zKC1 bVOYxscxA8rwSHe1P1lqgGcoKxK1jOBQjwZQy/jrPqe1Y6pdX1ecco+LKqJ66eWCAalQ ESSe9MPDzhHoRBJaKN812+2ENCxbB8c7Be/V1CpF/QWZ0SjD/6MwEAVoE8PQI0UHto4O 3hOu1E1XoLqhrX0F9yCZ747xt9al9Ja6aQo4+Rz/EXcWWMAVCpyHqwzRQGjdCmmfquWZ 92NQ== X-Gm-Message-State: AIkVDXLiXzSl4wTTFtMdRrBMKzJWfodvcTCuvDzYje5Y7cl3S8TfXlw8/kUgD7q7QJZZN9j9MQzmFuP7mJB9yA== X-Received: by 10.202.213.17 with SMTP id m17mr9706157oig.104.1484304387641; Fri, 13 Jan 2017 02:46:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.6.166 with HTTP; Fri, 13 Jan 2017 02:46:27 -0800 (PST) In-Reply-To: References: From: Vincenzo Maffione Date: Fri, 13 Jan 2017 11:46:27 +0100 Message-ID: Subject: Re: powerpc.LINT* broken in netmap(4) To: "Ngie Cooper (yaneurabeya)" Cc: "freebsd-net@freebsd.org" , freebsd-powerpc@freebsd.org, FreeBSD CURRENT , Luigi Rizzo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jan 2017 10:46:28 -0000 Hi, Thanks for reporting. The warning is innocuous, but I'm not sure how to silence it. Maybe diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c index cb1cff1f0e7..226a0864fd0 100644 --- a/sys/dev/netmap/netmap_generic.c +++ b/sys/dev/netmap/netmap_generic.c @@ -168,7 +168,7 @@ nm_os_get_mbuf(struct ifnet *ifp, int len) static void void_mbuf_dtor(struct mbuf *m, void *arg1, void *arg2) { } #define SET_MBUF_DESTRUCTOR(m, fn) do { \ - (m)->m_ext.ext_free =3D fn ? (void *)fn : (void *)void_mbuf_dtor; \ + (m)->m_ext.ext_free =3D (fn !=3D NULL) ? (void *)fn : (void *)void_mbuf_dtor; \ } while (0) static inline struct mbuf * or we could turn SET_MBUF_DESTRUCTOR into a real function. Cheers, VIncenzo 2017-01-13 11:22 GMT+01:00 Ngie Cooper (yaneurabeya) : > Hi, > I spotted these compilation errors on universe12a.freebsd.org for > both powerpc.LINT and powerpc.LINT64: > > cc1: warnings being treated as errors > /scratch/tmp/ngie/svn/sys/dev/netmap/netmap_generic.c: In function > 'generic_set_tx_event': > /scratch/tmp/ngie/svn/sys/dev/netmap/netmap_generic.c:765: warning: the > address of 'generic_mbuf_destructor' will always evaluate as 'true' > [-Waddress] > --- netmap_generic.o --- > *** [netmap_generic.o] Error code 1 > > I haven=E2=80=99t yet dug into why this only surfaces on powerpc,= yet=E2=80=A6 > Thanks, > -Ngie > --=20 Vincenzo Maffione