From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8893EC4360C for ; Thu, 3 Oct 2019 00:08:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 57288222BE for ; Thu, 3 Oct 2019 00:08:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PI/aMGex" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728213AbfJCAIT (ORCPT ); Wed, 2 Oct 2019 20:08:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55198 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfJCAIT (ORCPT ); Wed, 2 Oct 2019 20:08:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LX3dKDMWbmfdXy+k1nvUJV+7PrVhFHyukz+qUS83wpQ=; b=PI/aMGexMso1KjocPJKaNhNdu 4kUfwLq8UJLQn4nt+Y2SiyqL4CVAuymhlW0g7tGnbdgDfLyvDUeaCJQl78mZoD6SwfCsCjqeSTeRd tbTIdnBECyfKnbCX4pSN2+2S4gNKzXci1Ux38EoAl6xNapt06rcKyBJXC/2mJBt0O9IM9O9vZLix1 pfO+HJWEwIzsUuIeSshT8jfbUbmIkuwZG9Dq6aUFXFYrMUzBLnj1MVQ80wOipvXhBZjEy6h0Pr8Je oxt+nHVOCLCuB2yO8QV5dnDxYKa/hjirf+0Qz2J2UOj9j6Q3+WS914UMBsQq8tIUtHvjOKjfgDk9z 1Y0FLukiQ==; Received: from [2601:1c0:6280:3f0::9a1f] by bombadil.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iFofK-00082B-Ig; Thu, 03 Oct 2019 00:08:18 +0000 To: "netdev@vger.kernel.org" , David Miller Cc: Al Viro , "linux-doc@vger.kernel.org" From: Randy Dunlap Subject: [PATCH] lib: textsearch: fix escapes in example code Message-ID: <86cf431b-9dbc-d608-205d-1f161bb14533@infradead.org> Date: Wed, 2 Oct 2019 17:08:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Randy Dunlap This textsearch code example does not need the '\' escapes and they can be misleading to someone reading the example. Also, gcc and sparse warn that the "\%d" is an unknown escape sequence. Fixes: 5968a70d7af5 ("textsearch: fix kernel-doc warnings and add kernel-api section") Signed-off-by: Randy Dunlap Cc: "David S. Miller" Cc: netdev@vger.kernel.org --- lib/textsearch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- lnx-54-rc1.orig/lib/textsearch.c +++ lnx-54-rc1/lib/textsearch.c @@ -89,9 +89,9 @@ * goto errout; * } * - * pos = textsearch_find_continuous(conf, \&state, example, strlen(example)); + * pos = textsearch_find_continuous(conf, &state, example, strlen(example)); * if (pos != UINT_MAX) - * panic("Oh my god, dancing chickens at \%d\n", pos); + * panic("Oh my god, dancing chickens at %d\n", pos); * * textsearch_destroy(conf); */