Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp6018901ybg; Tue, 22 Oct 2019 11:47:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqw91pf3PEObtaGLUwQxMFlaLCaWq8kgoo7X/HiuEmvo+DYd9PMjP/jH90smPUzI8eZsCQkP X-Received: by 2002:aa7:c6cf:: with SMTP id b15mr32604390eds.215.1571770074995; Tue, 22 Oct 2019 11:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571770074; cv=none; d=google.com; s=arc-20160816; b=ybc6idFbyu6Vdp4aYkAc9wRMZ4qRIRrNYoLo/ykpmIccEdug/5jUxi7NjC79rSeb74 wdSIIFNpCUBInICnJFt+ZyXI7J43p/BXffK01kfwP0AXpSGh6mefHwwrHvt0PotsTaK3 iZFLBX3N52qPgw2wUQvPoFriRClGszG3Is2UcF66y+hdqs61KIwYKuBR75Yd2rwZP59Z 8i8vYVukDN6f4ZKbwxtnFRpic4lgS/6t8DpEyg2XyffQqFa2Y3kxxWNoTNzO0+Cwlfh1 PwPSPCeCzXC3rYaNFZf06r+RxGKnmQNKY0b+Zkb3EjriOoYTNgCRx8geGkO3tKAbAhqG /baA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sja+Fgo0bAvbRP0S/b7Ybm+O4OdzsMHo7UdKMU1Ey/0=; b=ekZSRqu4nwnkbIw6QA2QVsdtVvqEOJ9Tnvt3GGFBD4G6E9+Tb8UfS00jXh8RlHJxmt VkvkPzLIbOP3XWKz6iMVBJtefOrof+WoMg2sdQ/rOxVs68MhAp9LatRNEORafRFsrsek ixQqvNlAumM8y57TAOxWQMoIJqUKXFSdlJa1PvQ2s4Krt51AowPRHdGJiNcVEH62Kv+s V8qwN0LTyAs1pPRWLhSLFRTP9ojIV73LRBine1KVPa38lVxIaVMNIOZt4og+EUd/2hz5 UGZtb3dXL9e8ohJmMkOBnh8JcQPFWVtJiKQ+Z6OMarFK24Oq95/muH3Bu2ihcAhwirxc IdRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SbunP9hN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h43si12618176ede.142.2019.10.22.11.47.29; Tue, 22 Oct 2019 11:47:54 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SbunP9hN; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732779AbfJVSpT (ORCPT + 99 others); Tue, 22 Oct 2019 14:45:19 -0400 Received: from mail-qk1-f193.google.com ([209.85.222.193]:43640 "EHLO mail-qk1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732580AbfJVSpT (ORCPT ); Tue, 22 Oct 2019 14:45:19 -0400 Received: by mail-qk1-f193.google.com with SMTP id a194so13180148qkg.10; Tue, 22 Oct 2019 11:45:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sja+Fgo0bAvbRP0S/b7Ybm+O4OdzsMHo7UdKMU1Ey/0=; b=SbunP9hNL4Rg3+mPuQzprPPBCeBIXu/LCMocGCSvMD5LatAWUanoqIxdLScicxVKyU e313W6rMeMPoR8KHHX6LVpDnTJpuxDZy2wuky8ZB4Oxy9H1KW/jGpqsO/rAJB5cCpU1V 0KmJd0c1paaQ3nmFAU3krC/PPPtanjxh/7bFyWZbNjlCavZnxIXOJ6sVcM1JrvqegnwJ yB9NTfUOC8J58EZsASfIxffVwKOJFXIVVn01r6SZ3qtPL8QYdyb6AYetYDV6LR3ZlSmB wMxoJLZMOQlMM6ceHFmmDze/aEvLdYr/f/8eCAg4gDPLLMDL6dMdSREBsAKBghsBVfkL 39rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sja+Fgo0bAvbRP0S/b7Ybm+O4OdzsMHo7UdKMU1Ey/0=; b=ZZqzXlh9ccUaegRO+bM4sn1B82nakX45tdFOpQtMZ/LhlvgZ+Yr1TSw5tBe8dh5QJl RK1Wv5H50FbduQ165DjgGOEb6RfY6DvuQdTW883ljbLbyzrR2DpNPC7fblgHjcWFnJi1 Dtq2oV+VSRMyzYFdWzcaPMplXeKtK1y39s9sGFt4tIMda6vzm3j8S3eXWatLt+XsEWbd +ame+vaq8unV12CxelKr3Y1hI3SMAwU57+IJos+0iFnVo4nJwHPgK56PDS+/Q5Pmqvge eduo8QqyIwJAt33wVZZBFbGGQjLOtwrL+xLoivqiqegs28PVmvE1ZusjH/tCmK8R1/EV 5/og== X-Gm-Message-State: APjAAAWyjpgNY3koilmxGqyHjgl2R/DGnUerEdA2u3R9UOF5cp4QLI4S KNa2yZD4c6Eim5QhoeVUynOSljrDx2jU+Lp+srbHZUBcn4M= X-Received: by 2002:a37:520a:: with SMTP id g10mr4512468qkb.39.1571769918191; Tue, 22 Oct 2019 11:45:18 -0700 (PDT) MIME-Version: 1.0 References: <20191022125925.10508-1-ben.dooks@codethink.co.uk> In-Reply-To: <20191022125925.10508-1-ben.dooks@codethink.co.uk> From: Andrii Nakryiko Date: Tue, 22 Oct 2019 11:45:07 -0700 Message-ID: Subject: Re: [PATCH] xdp: fix type of string pointer in __XDP_ACT_SYM_TAB To: "Ben Dooks (Codethink)" Cc: linux-kernel@lists.codethink.co.uk, Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Steven Rostedt , Ingo Molnar , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , Networking , bpf , open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 22, 2019 at 6:51 AM Ben Dooks (Codethink) wrote: > > The table entry in __XDP_ACT_SYM_TAB for the last item is set > to { -1, 0 } where it should be { -1, NULL } as the second item > is a pointer to a string. > > Fixes the following sparse warnings: > > ./include/trace/events/xdp.h:28:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:53:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:82:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:140:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:155:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:190:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:225:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:260:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:318:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:356:1: warning: Using plain integer as NULL pointer > ./include/trace/events/xdp.h:390:1: warning: Using plain integer as NULL pointer > > Signed-off-by: Ben Dooks (Codethink) > --- Acked-by: Andrii Nakryiko > Cc: Alexei Starovoitov > Cc: Daniel Borkmann > Cc: Martin KaFai Lau > Cc: Song Liu > Cc: Yonghong Song > Cc: Steven Rostedt > Cc: Ingo Molnar > Cc: "David S. Miller" > Cc: Jakub Kicinski > Cc: Jesper Dangaard Brouer > Cc: John Fastabend > Cc: netdev@vger.kernel.org > Cc: bpf@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > --- > include/trace/events/xdp.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/trace/events/xdp.h b/include/trace/events/xdp.h > index 8c8420230a10..c7e3c9c5bad3 100644 > --- a/include/trace/events/xdp.h > +++ b/include/trace/events/xdp.h > @@ -22,7 +22,7 @@ > #define __XDP_ACT_SYM_FN(x) \ > { XDP_##x, #x }, > #define __XDP_ACT_SYM_TAB \ > - __XDP_ACT_MAP(__XDP_ACT_SYM_FN) { -1, 0 } > + __XDP_ACT_MAP(__XDP_ACT_SYM_FN) { -1, NULL } > __XDP_ACT_MAP(__XDP_ACT_TP_FN) > > TRACE_EVENT(xdp_exception, > -- > 2.23.0 >