From owner-svn-src-all@freebsd.org Mon Sep 18 17:43:09 2017 Return-Path: Delivered-To: svn-src-all@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 BE559E21776; Mon, 18 Sep 2017 17:43:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-pf0-f176.google.com (mail-pf0-f176.google.com [209.85.192.176]) (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 9657A733E8; Mon, 18 Sep 2017 17:43:09 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: by mail-pf0-f176.google.com with SMTP id u12so597618pfl.4; Mon, 18 Sep 2017 10:43:09 -0700 (PDT) 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=NcAV6Z5RBmy9oX5kaMrU785w0nSFZYikIGRi4OjbwCU=; b=QzwyHoTK7ua43cmtsBvJ0oDlsfetuAB1tPeYoApghpNx8P1WNoVFEyGmHCiA+x3lpf 4qXghyqrvkDfT2SS2UfOH0RDKATeGnkkLOJ8jLcHgTft9gXHxeykCIe+cvaqpROX0KiT 4kZ5bsEQY1jQn8rBbhDFajXWhC/SlmAOZI42yRVG1LlLYKYe+2LjNKeqgbSn77T+OP3P A2AiBNAjC+4FcvPvrFKllbhIoSsXUhAufKyb1RCWMFNlg3oa1dLUzF3LOYDooSqB91Wb KsqSzmkxY8HRgWh+pnX4cfaekWFtcF1Z2ykWYtuJSEfSFUKt64hgqsZ2bzlhywns7DSi zHGg== X-Gm-Message-State: AHPjjUhtKHhj80rrlapJzE9NUptlB8A3H1fYQuiW4iEjChOweR/vOD9f vtLK0GEqfDyiV4OX/5o= X-Received: by 10.84.232.14 with SMTP id h14mr36694553plk.274.1505756583248; Mon, 18 Sep 2017 10:43:03 -0700 (PDT) Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com. [74.125.83.44]) by smtp.gmail.com with ESMTPSA id f69sm1666pff.4.2017.09.18.10.43.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 10:43:02 -0700 (PDT) Received: by mail-pg0-f44.google.com with SMTP id 188so527649pgb.2; Mon, 18 Sep 2017 10:43:02 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7Rniq3AQcjYlNCLIklDbWhKGxqAA9KsMA59ZRYHg2gkiaAHSfKXYD9OBTERNdYV0133825iHNWF1HSEO0PXSo= X-Received: by 10.84.133.11 with SMTP id 11mr36865739plf.13.1505756582198; Mon, 18 Sep 2017 10:43:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.207.193 with HTTP; Mon, 18 Sep 2017 10:43:01 -0700 (PDT) In-Reply-To: <201709172340.v8HNeGuP016998@repo.freebsd.org> References: <201709172340.v8HNeGuP016998@repo.freebsd.org> From: Ryan Libby Date: Mon, 18 Sep 2017 10:43:01 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r323692 - in head/sys/compat: linsysfs linux To: Conrad Meyer Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Sep 2017 17:43:09 -0000 On Sun, Sep 17, 2017 at 4:40 PM, Conrad Meyer wrote: > Author: cem > Date: Sun Sep 17 23:40:16 2017 > New Revision: 323692 > URL: https://svnweb.freebsd.org/changeset/base/323692 > > Log: > linsysfs(5): Add support for recent libdrm > > Expose more information about PCI devices (and GPUs in particular) via > linsysfs to libdrm. > > This allows unmodified modern 64-bit Linux libdrm to work, which allows > modern Linux Mesa to work. The submitter reports that he tested the change > with an Ubuntu 16.04 chroot + amdgpu from graphics/drm-next-kmod. > > PR: 222375 > Submitted by: Greg V > > Modified: > head/sys/compat/linsysfs/linsysfs.c > head/sys/compat/linux/linux_util.c > > Modified: head/sys/compat/linsysfs/linsysfs.c > ============================================================================== > --- head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 22:58:13 2017 (r323691) > +++ head/sys/compat/linsysfs/linsysfs.c Sun Sep 17 23:40:16 2017 (r323692) > @@ -133,20 +133,135 @@ linsysfs_link_scsi_host(PFS_FILL_ARGS) > return (0); > } > > +static int > +linsysfs_fill_data(PFS_FILL_ARGS) > +{ > + sbuf_printf(sb, "%s", pn->pn_data); > + return (0); > +} This broke the gcc build with -Wformat [1]: /workspace/src/sys/compat/linsysfs/linsysfs.c: In function 'linsysfs_fill_data': /workspace/src/sys/compat/linsysfs/linsysfs.c:139:20: error: format '%s' expects argument of type 'char *', but argument 3 has type 'void *' [-Werror=format=] sbuf_printf(sb, "%s", pn->pn_data); It builds if a char * cast is added. Is that the right fix? [1] https://ci.freebsd.org/job/FreeBSD-head-amd64-gcc/2532/