Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbdFTWjw (ORCPT ); Tue, 20 Jun 2017 18:39:52 -0400 Received: from mail-io0-f174.google.com ([209.85.223.174]:32822 "EHLO mail-io0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751767AbdFTWji (ORCPT ); Tue, 20 Jun 2017 18:39:38 -0400 MIME-Version: 1.0 In-Reply-To: <20170620203436.630727-1-arnd@arndb.de> References: <20170620203436.630727-1-arnd@arndb.de> From: Kees Cook Date: Tue, 20 Jun 2017 15:39:36 -0700 X-Google-Sender-Auth: B6Qo6pf8ep308o1LxXDkED-tnBs Message-ID: Subject: Re: [PATCH] tty: hide unused pty_get_peer function To: Arnd Bergmann Cc: Greg Kroah-Hartman , Jiri Slaby , Aleksa Sarai , Colin Ian King , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 519 Lines: 18 On Tue, Jun 20, 2017 at 1:34 PM, Arnd Bergmann wrote: > TIOCGPTPEER is only used for unix98 PTYs, and we get a warning > when those are disabled: > > drivers/tty/pty.c:466:12: error: 'pty_get_peer' defined but not used [-Werror=unused-function] > > This moves the respective functions inside of the existing #ifdef. > > Fixes: 54ebbfb16034 ("tty: add TIOCGPTPEER ioctl") > Signed-off-by: Arnd Bergmann Reviewed-by: Kees Cook -Kees -- Kees Cook Pixel Security