From patchwork Fri Jun 7 15:39:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166169 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp809830ili; Fri, 7 Jun 2019 08:55:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx/9/1AHnyIUSpIVmgVa4juhqOt4J3WsSZWfOY5X+aSIwCpXQ/soXR71MhFveGIbOnfr6p0 X-Received: by 2002:a17:902:467:: with SMTP id 94mr1042935ple.131.1559922922465; Fri, 07 Jun 2019 08:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922922; cv=none; d=google.com; s=arc-20160816; b=x+4redTU6BPgA8bYxwF4Cbet/IBZvZWJzGhzOIbFDhA8uEh9IhFOIu5BSX75VrJ1lZ ACPLPuWlh4TFfFdoL4YfxVIi+QnnwOMbGDsfQ4sHjMjpiElV29lL9aJAmtuHdASRQHGK L2uAHQIRlkG4MZVIgngWJ/HDXUmtwprOoBFbXvWsJhQcYTss6OTaaW6jF+79t8Iyqpoj +mZC9FYaBas+O2s5YJc+RzwAnuASVHwSRloYpc/0x0CiqYIXJPPOb1ZlIcVW7rWzIgK5 fdaJCeIfe/HfZ+hRLysM4Ghu4zo9uHugxb59atXIa5A1+RWTq5PhBfTHRuSDdmlmDog7 UMAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=btDaf6zTQc18VUihCFhqnu7eMF2tJPvEYeGZMNYWpc4=; b=HuqGYRZA0IjpZinjjOL893r2AexHEoun38641uecNj8nm0v8k05t7rxd0mf40g8o/9 H4/PIWXpzXzxyYKB3V0k+qMxog3LVhskBgo4R4KjIrVB4ipgHtjTeb4a/4eI7k/jc/pQ vdG5F+0dSO3v+Qw69LF24PlHd+HXy09xBJDppkJlHEXni9oNn7Q2KCJLOgmmhl7Fr8fb 2uKWJ4C9eSuLH5MoMuzhT3BzE/qXrInXwuQ2L+KYQwlEjHTyCFOgdZoLOZ6Nv+qp7Zsv HPzqj65Aa+lZXaSILJEAGqNBI2/CfA5KYf5vAdF+l9m+/jUFVTMq/oWkS7TBPbZsnu6D +HTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WlLsq4Te; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si2165422pgm.154.2019.06.07.08.55.22; Fri, 07 Jun 2019 08:55:22 -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=@kernel.org header.s=default header.b=WlLsq4Te; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731934AbfFGPzV (ORCPT + 30 others); Fri, 7 Jun 2019 11:55:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:57800 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731293AbfFGPpq (ORCPT ); Fri, 7 Jun 2019 11:45:46 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3A0C2147A; Fri, 7 Jun 2019 15:45:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922346; bh=noMDM0+G7fvAYTkP+qTa1fHN6gTn8pJOT/sFJUBXcqQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WlLsq4TeJOAmaLUvo8r6Ymw7jSOAgAJWOc3Ab6Dh2Cb1544r/FxbDrGVrVAtTAKTM OyyjRscfDVwk6e3BrgSEelCntoSSvLXNO9M9d2neO6gp/GPYXZcAPkL5UvcaIBwJKe gJ4ZhpvfdiAFZrpra0mAkvxS7lETjiYaY9xO8ATc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Okamoto Satoru , Masahisa Kojima , Ard Biesheuvel , Wolfram Sang Subject: [PATCH 4.19 37/73] i2c: synquacer: fix synquacer_i2c_doxfer() return value Date: Fri, 7 Jun 2019 17:39:24 +0200 Message-Id: <20190607153853.262623656@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Masahisa Kojima commit ff9378904d9d7a3fcb8406604e089e535e357b1d upstream. master_xfer should return the number of messages successfully processed. Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller") Cc: # v4.19+ Signed-off-by: Okamoto Satoru Signed-off-by: Masahisa Kojima Acked-by: Ard Biesheuvel Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- drivers/i2c/busses/i2c-synquacer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/i2c/busses/i2c-synquacer.c +++ b/drivers/i2c/busses/i2c-synquacer.c @@ -356,7 +356,7 @@ static int synquacer_i2c_doxfer(struct s /* wait 2 clock periods to ensure the stop has been through the bus */ udelay(DIV_ROUND_UP(2 * 1000, i2c->speed_khz)); - return 0; + return ret; } static irqreturn_t synquacer_i2c_isr(int irq, void *dev_id) From patchwork Fri Jun 7 15:39:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166158 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp800158ili; Fri, 7 Jun 2019 08:46:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqyemkjIWlBIcCZAGr6wdJU74Y0OtgprZm90fi0DN9ib3pTPsdb1OINCi81JcHE2Pnnz3CiZ X-Received: by 2002:a62:f20b:: with SMTP id m11mr6931205pfh.125.1559922416658; Fri, 07 Jun 2019 08:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922416; cv=none; d=google.com; s=arc-20160816; b=TTZHO8n+7EofaVVqi3qvwDXSIXA2WG+gZO3UBYmejywIWv/851v/xw08j0M1k2pW2a OILIdaKrLNrQSncCWiYR0Fx6INiiw77QJ+omvwAs1JdGjeZw7EpPxtdi6kF7GeArUIQB SFedEQIMtk+LZngHc36BI8Hxm+dD52RblCDXWegbzPqLNoLvSQa6WMJHbceCnNsmY+PX hRySZ9MRiIDyawWEnArYJfv/jWOxpHU7z0zCsC0ex5+DQjgR7V4CAyuyZ1b0hZgy9tHT m5t9P5F1l9PRoqUB/ePykf/cboa/1JhGdAWnJI+gwaPh2YCG205LLeiNgn9Aqu7KZ/Hh eaNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6ExBDgcSDbdGMr5YOfmBM8k/qS/T3lqkKZO15iHk6V8=; b=dBisMG0mfA76ZlmLBSAhjn/u4ErP+69zZLjD1Zf0Yv6R6EOHu0wdSGEQLUDcRRzVR7 thlfXYKPxlR9MNYMQdC0YjKScykcFqVuAK0fgzKtywZPerpyyTa7BP7VVnguYbCn+yP0 uljsJ/EM6piaPiGKBAGUno+dwF8xDO2tKITIHyhDVU1eh1MiDR9eCDnAdRS9A3GHTCmI OyV4Okdk6PljoOT5YihbBFE0aOqjoNLnD/DdVVv6eovc3lzOjR3mWAf8IeRmQO8555HN omxveTW6PnVzEneTjL5GESEVLzJPZC0N/ieHPHoONiiO0UVMfUKg8OWb7rrw1utzM71b /Kbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="sf/YpG96"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h4si1971891pjs.103.2019.06.07.08.46.56; Fri, 07 Jun 2019 08:46:56 -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=@kernel.org header.s=default header.b="sf/YpG96"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731492AbfFGPqz (ORCPT + 30 others); Fri, 7 Jun 2019 11:46:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:59474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730653AbfFGPqx (ORCPT ); Fri, 7 Jun 2019 11:46:53 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D2C8721479; Fri, 7 Jun 2019 15:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922413; bh=2nSs+r0mkSEPa95yznIxQ/o92NaL/HmVqSOrpeVP8Es=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sf/YpG96WgEmWDxg0u9Kw04CUtDZKebI+08trFSV/KdKUVk3kSKZOjTkp2AeuVLH6 qKcaeG6rxVYRscI/YHE5esi2jkIJ5nYkI1PyFtwx+wWXbFFs1gE7M2IVU8A90XBSWd ITBNhdssP8L2b7GNkrB2wXHVGajdPEOVbAHJFTzg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Catalin Marinas , Will Deacon Subject: [PATCH 4.19 42/73] arm64: Fix the arm64_personality() syscall wrapper redirection Date: Fri, 7 Jun 2019 17:39:29 +0200 Message-Id: <20190607153853.845450203@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Catalin Marinas commit 00377277166bac6939d8f72b429301369acaf2d8 upstream. Following commit 4378a7d4be30 ("arm64: implement syscall wrappers"), the syscall function names gained the '__arm64_' prefix. Ensure that we have the correct #define for redirecting a default syscall through a wrapper. Fixes: 4378a7d4be30 ("arm64: implement syscall wrappers") Cc: # 4.19.x- Acked-by: Mark Rutland Signed-off-by: Catalin Marinas Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/kernel/sys.c +++ b/arch/arm64/kernel/sys.c @@ -50,7 +50,7 @@ SYSCALL_DEFINE1(arm64_personality, unsig /* * Wrappers to pass the pt_regs argument. */ -#define sys_personality sys_arm64_personality +#define __arm64_sys_personality __arm64_sys_arm64_personality asmlinkage long sys_ni_syscall(const struct pt_regs *); #define __arm64_sys_ni_syscall sys_ni_syscall From patchwork Fri Jun 7 15:39:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166159 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp800250ili; Fri, 7 Jun 2019 08:47:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+lIqbv8L5dgXxkrsBtXZ1Qg+MjmDk32lFE3MTwzSVfH9ffvoK4uA71JWz/qFsUsUfiZek X-Received: by 2002:a65:44c8:: with SMTP id g8mr3343660pgs.443.1559922421956; Fri, 07 Jun 2019 08:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922421; cv=none; d=google.com; s=arc-20160816; b=vcBNR9GG7yeXdp8dABdqmpRAwyASiVCSm+eulwmIm5H6FlUVemPUBvJlvojnFWcdFk AHreNNM+j3M9X/kEgIzPwd7VRxwTLaVpZoiLbCBa15HUhU8bJ6u9TzQTEnoYVt0ZOTh+ UEDHZ9cebpQHLusnTweX8gDmp5e85xVmEsAckvPTIT0BkV0vAAb0AYG4JcrCHil4Y8JJ 7gMAKHuFTqt8fLJwTAxoEt+dEqaFFfdgpjAcUN/cbA3afexAKM71bngJZQQHWTYgvFY5 QJ4a7fBOj9VChn02za+jv9Ak9jwCSLC20pCcTlW5Tr9bawnLlZd8gZxiP9fuZz02H6TQ n9Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=q4POIVw54Yt+r2qDNxjtcpiHjGCUXPhPqj7d2pRGGOQ=; b=L0fZTxjPy3dgRvqZgUZplH5meOBUcy+o2scTtbAYXbA6Ap3ATSt3nv5nnPwSO2a63b G3FkrLubnimkbF5LYih+OaK45omqXIkKorFAZDrQjgZOBenGv7xQT8mdjJk4roEiTn8t oZcifkjHiBiGN0mVLjANcUymbTVeNg3pxUWnvAN4gDfb19YRut/BrhQTMziRJF9U+BAJ d2EYv7a+je16InyIUa1IdxXrb+WEcGCpxXbFTNMH3TA8caM3WZFPsEO6ziFcIWH0VzMs HFsBQItrGUkLJazS2Y8rkEG1mVk67UNlDjcGx9q+rn0Fn2BCqpm6XYDInOHbVcPk43Pv PriA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=HDeyLA+G; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q20si2087866pjp.24.2019.06.07.08.47.01; Fri, 07 Jun 2019 08:47:01 -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=@kernel.org header.s=default header.b=HDeyLA+G; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731499AbfFGPrA (ORCPT + 30 others); Fri, 7 Jun 2019 11:47:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:59538 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730977AbfFGPq5 (ORCPT ); Fri, 7 Jun 2019 11:46:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EB2C32147A; Fri, 7 Jun 2019 15:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922416; bh=y1bzMfbqPphPMtnUPCsYu7EnJPvPqvUKBEnwiVmJSs0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HDeyLA+GsuvZKcJ8Rc8HGuo2pJ3tNHxtVwdFHo4+m2KyZL2u0UkFtupkCPqPcBTRE l11SufsP99wA/jaDI+J8asbNLiGoHku4SAb0I7MW2BaPeTVjWNHMOXSwDxFebsAiik wdxh0NAyrHxGA+OuVY4vj3NsLswAN7vtW93jaZrw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Corbet Subject: [PATCH 4.19 43/73] docs: Fix conf.py for Sphinx 2.0 Date: Fri, 7 Jun 2019 17:39:30 +0200 Message-Id: <20190607153853.966681426@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Corbet commit 3bc8088464712fdcb078eefb68837ccfcc413c88 upstream. Our version check in Documentation/conf.py never envisioned a world where Sphinx moved beyond 1.x. Now that the unthinkable has happened, fix our version check to handle higher version numbers correctly. Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman --- Documentation/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Documentation/conf.py +++ b/Documentation/conf.py @@ -37,7 +37,7 @@ needs_sphinx = '1.3' extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', 'cdomain', 'kfigure', 'sphinx.ext.ifconfig'] # The name of the math extension changed on Sphinx 1.4 -if major == 1 and minor > 3: +if (major == 1 and minor > 3) or (major > 1): extensions.append("sphinx.ext.imgmath") else: extensions.append("sphinx.ext.pngmath") From patchwork Fri Jun 7 15:39:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 166157 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp798346ili; Fri, 7 Jun 2019 08:45:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqy9H24JKLz4w7Fh1D1FgvCW8kn7SNQyVpD0gsPA+++T2uTMBSmTtmkR/7IekVYgYWHqwwY/ X-Received: by 2002:a17:90a:208e:: with SMTP id f14mr6304871pjg.57.1559922323013; Fri, 07 Jun 2019 08:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922323; cv=none; d=google.com; s=arc-20160816; b=h9sA7lNA7HVc2qDSir8roCiyw94k1yFXb4a0muRm6PfJLGDebXJi7Vj8C4ZWXEs0aC dwcIXTIATTn5PXn/FNG55LLizwFDZ5xWE3YqWa2c6cnlHtLcDHSGLRLVgKr4eOTauqNZ pGbMXHZK2qGE1O+/NxK7z8pQmwpy2z6cwy7h2JJlLnKmw1bNBgM2XC9AzWPV1/FsMmSy 1DZmuNxEfeeXTGRaH7CfGu7HEamkg9JoKJR3vywNEdT5YAwXVKjkPFZGBmpjtD1JgN4c d1KVFAmGuYei4lrxMA7CH8+hy1drwl6obfg53C5gD3Gx1JI2VkABuq1gzSAEHJ4iQTsO x+aQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=toUuPetH8RkcD1e9FSo36rj6HkMijITY4ourmq3eQz4=; b=LDXdKu5yYHn6C8z/8J4cMgQKdAKULg5eD6StwSb4GIXLgFtr5mJ2K/IR0ec0CtTpCb +ce64awP5Pnicoez80vv3GFckfDimYfsOVCzYTPAYU2KHoJIvFKpQpuML8lTaKdBIcKZ vvULCJAQvhANWZGiIPAWN+ru2r0rNX4t1g63cttMXJALgldEZs2RdAquz6DL6WF9kkd5 C9nMMFRApcJho2gXQ35lF14Jjq9uuU844C2FitG7jfyDBWGhAr3a8K4LvlAKzUD2irSs DtL9Isx49n0osxUZLk1zs16/hmg/xTCfOlavKFc08z+wRSSz725sds5fESmZE9RtW8eg E9oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=vOjSMdln; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u1si1982564pfh.136.2019.06.07.08.45.22; Fri, 07 Jun 2019 08:45:22 -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=@kernel.org header.s=default header.b=vOjSMdln; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731215AbfFGPpV (ORCPT + 30 others); Fri, 7 Jun 2019 11:45:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:57152 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730622AbfFGPpT (ORCPT ); Fri, 7 Jun 2019 11:45:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C93442147A; Fri, 7 Jun 2019 15:45:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559922318; bh=EUlbzP8U0YE76e/2CHIcoq9TFF6XU6wNf6zR9WXMfZ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vOjSMdlnUTD/9MzGs+3gZxQgCvobdoS5Dy+4TG71YDQ1c7oRYcPw2kUw3+06AwcND fe8jAzh1trGXZpD4dIlnqfw/dKttPVEH/fokfnRgOHiBTykFARNhPrQX4RYJV0sOYz k18RSwiCxbBe1c7xDf4yeX3jS3ZMdANgJFVTbJHU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Corbet Subject: [PATCH 4.19 45/73] doc: Cope with Sphinx logging deprecations Date: Fri, 7 Jun 2019 17:39:32 +0200 Message-Id: <20190607153854.193466898@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607153848.669070800@linuxfoundation.org> References: <20190607153848.669070800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Corbet commit 096ea522e84ea68f8e6c41e5e7294731a81e29bc upstream. Recent versions of sphinx will emit messages like: Documentation/sphinx/kerneldoc.py:103: RemovedInSphinx20Warning: app.warning() is now deprecated. Use sphinx.util.logging instead. Switch to sphinx.util.logging to make this unsightly message go away. Alas, that interface was only added in version 1.6, so we have to add a version check to keep things working with older sphinxes. Cc: stable@vger.kernel.org Signed-off-by: Jonathan Corbet Signed-off-by: Greg Kroah-Hartman --- Documentation/sphinx/kerneldoc.py | 12 +++++++---- Documentation/sphinx/kernellog.py | 28 ++++++++++++++++++++++++++ Documentation/sphinx/kfigure.py | 40 +++++++++++++++++++++----------------- 3 files changed, 59 insertions(+), 21 deletions(-) --- a/Documentation/sphinx/kerneldoc.py +++ b/Documentation/sphinx/kerneldoc.py @@ -49,6 +49,8 @@ if Use_SSI: else: from sphinx.ext.autodoc import AutodocReporter +import kernellog + __version__ = '1.0' class KernelDocDirective(Directive): @@ -100,7 +102,8 @@ class KernelDocDirective(Directive): cmd += [filename] try: - env.app.verbose('calling kernel-doc \'%s\'' % (" ".join(cmd))) + kernellog.verbose(env.app, + 'calling kernel-doc \'%s\'' % (" ".join(cmd))) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() @@ -110,7 +113,8 @@ class KernelDocDirective(Directive): if p.returncode != 0: sys.stderr.write(err) - env.app.warn('kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode)) + kernellog.warn(env.app, + 'kernel-doc \'%s\' failed with return code %d' % (" ".join(cmd), p.returncode)) return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))] elif env.config.kerneldoc_verbosity > 0: sys.stderr.write(err) @@ -136,8 +140,8 @@ class KernelDocDirective(Directive): return node.children except Exception as e: # pylint: disable=W0703 - env.app.warn('kernel-doc \'%s\' processing failed with: %s' % - (" ".join(cmd), str(e))) + kernellog.warn(env.app, 'kernel-doc \'%s\' processing failed with: %s' % + (" ".join(cmd), str(e))) return [nodes.error(None, nodes.paragraph(text = "kernel-doc missing"))] def do_parse(self, result, node): --- /dev/null +++ b/Documentation/sphinx/kernellog.py @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Sphinx has deprecated its older logging interface, but the replacement +# only goes back to 1.6. So here's a wrapper layer to keep around for +# as long as we support 1.4. +# +import sphinx + +if sphinx.__version__[:3] >= '1.6': + UseLogging = True + from sphinx.util import logging + logger = logging.getLogger('kerneldoc') +else: + UseLogging = False + +def warn(app, message): + if UseLogging: + logger.warning(message) + else: + app.warn(message) + +def verbose(app, message): + if UseLogging: + logger.verbose(message) + else: + app.verbose(message) + + --- a/Documentation/sphinx/kfigure.py +++ b/Documentation/sphinx/kfigure.py @@ -60,6 +60,8 @@ import sphinx from sphinx.util.nodes import clean_astext from six import iteritems +import kernellog + PY3 = sys.version_info[0] == 3 if PY3: @@ -171,20 +173,20 @@ def setupTools(app): This function is called once, when the builder is initiated. """ global dot_cmd, convert_cmd # pylint: disable=W0603 - app.verbose("kfigure: check installed tools ...") + kernellog.verbose(app, "kfigure: check installed tools ...") dot_cmd = which('dot') convert_cmd = which('convert') if dot_cmd: - app.verbose("use dot(1) from: " + dot_cmd) + kernellog.verbose(app, "use dot(1) from: " + dot_cmd) else: - app.warn("dot(1) not found, for better output quality install " - "graphviz from http://www.graphviz.org") + kernellog.warn(app, "dot(1) not found, for better output quality install " + "graphviz from http://www.graphviz.org") if convert_cmd: - app.verbose("use convert(1) from: " + convert_cmd) + kernellog.verbose(app, "use convert(1) from: " + convert_cmd) else: - app.warn( + kernellog.warn(app, "convert(1) not found, for SVG to PDF conversion install " "ImageMagick (https://www.imagemagick.org)") @@ -220,12 +222,13 @@ def convert_image(img_node, translator, # in kernel builds, use 'make SPHINXOPTS=-v' to see verbose messages - app.verbose('assert best format for: ' + img_node['uri']) + kernellog.verbose(app, 'assert best format for: ' + img_node['uri']) if in_ext == '.dot': if not dot_cmd: - app.verbose("dot from graphviz not available / include DOT raw.") + kernellog.verbose(app, + "dot from graphviz not available / include DOT raw.") img_node.replace_self(file2literal(src_fname)) elif translator.builder.format == 'latex': @@ -252,7 +255,8 @@ def convert_image(img_node, translator, if translator.builder.format == 'latex': if convert_cmd is None: - app.verbose("no SVG to PDF conversion available / include SVG raw.") + kernellog.verbose(app, + "no SVG to PDF conversion available / include SVG raw.") img_node.replace_self(file2literal(src_fname)) else: dst_fname = path.join(translator.builder.outdir, fname + '.pdf') @@ -265,18 +269,19 @@ def convert_image(img_node, translator, _name = dst_fname[len(translator.builder.outdir) + 1:] if isNewer(dst_fname, src_fname): - app.verbose("convert: {out}/%s already exists and is newer" % _name) + kernellog.verbose(app, + "convert: {out}/%s already exists and is newer" % _name) else: ok = False mkdir(path.dirname(dst_fname)) if in_ext == '.dot': - app.verbose('convert DOT to: {out}/' + _name) + kernellog.verbose(app, 'convert DOT to: {out}/' + _name) ok = dot2format(app, src_fname, dst_fname) elif in_ext == '.svg': - app.verbose('convert SVG to: {out}/' + _name) + kernellog.verbose(app, 'convert SVG to: {out}/' + _name) ok = svg2pdf(app, src_fname, dst_fname) if not ok: @@ -305,7 +310,8 @@ def dot2format(app, dot_fname, out_fname with open(out_fname, "w") as out: exit_code = subprocess.call(cmd, stdout = out) if exit_code != 0: - app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd))) + kernellog.warn(app, + "Error #%d when calling: %s" % (exit_code, " ".join(cmd))) return bool(exit_code == 0) def svg2pdf(app, svg_fname, pdf_fname): @@ -322,7 +328,7 @@ def svg2pdf(app, svg_fname, pdf_fname): # use stdout and stderr from parent exit_code = subprocess.call(cmd) if exit_code != 0: - app.warn("Error #%d when calling: %s" % (exit_code, " ".join(cmd))) + kernellog.warn(app, "Error #%d when calling: %s" % (exit_code, " ".join(cmd))) return bool(exit_code == 0) @@ -415,15 +421,15 @@ def visit_kernel_render(self, node): app = self.builder.app srclang = node.get('srclang') - app.verbose('visit kernel-render node lang: "%s"' % (srclang)) + kernellog.verbose(app, 'visit kernel-render node lang: "%s"' % (srclang)) tmp_ext = RENDER_MARKUP_EXT.get(srclang, None) if tmp_ext is None: - app.warn('kernel-render: "%s" unknown / include raw.' % (srclang)) + kernellog.warn(app, 'kernel-render: "%s" unknown / include raw.' % (srclang)) return if not dot_cmd and tmp_ext == '.dot': - app.verbose("dot from graphviz not available / include raw.") + kernellog.verbose(app, "dot from graphviz not available / include raw.") return literal_block = node[0]