From patchwork Thu Jul 12 19:59:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 10522233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9FF1C602B3 for ; Thu, 12 Jul 2018 19:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B63F29C89 for ; Thu, 12 Jul 2018 19:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F49229C8C; Thu, 12 Jul 2018 19:59:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 20B1A29C89 for ; Thu, 12 Jul 2018 19:59:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732248AbeGLUKo (ORCPT ); Thu, 12 Jul 2018 16:10:44 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:41244 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732229AbeGLUKo (ORCPT ); Thu, 12 Jul 2018 16:10:44 -0400 Received: by mail-pl0-f66.google.com with SMTP id w8-v6so11129902ply.8 for ; Thu, 12 Jul 2018 12:59:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding; bh=qH5pRUYsx+cOEzUBrwHWQb20E9/DWHrppW9IxPy3Xss=; b=KP1U/2AhxfzSQ2OPzu5ps7jUE9kayQ8s0MMOJwvQjjtPHBy7+sHITyRveEFOZdl/bm CnR9HbZn127UnKFyPmpWLEUeRBHd1McapQAKkNp7MIKiHeglYtbH9bCB45CLaACQRn+x pqL8tRuQfcqPyT3HqAeVeFIEPmplyyWwutoN0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding; bh=qH5pRUYsx+cOEzUBrwHWQb20E9/DWHrppW9IxPy3Xss=; b=KLQ5wnLWsYEW6t6nnEeuJX9mdJ4TARjDZglHR1HnSn10G+SGhjBilpAkYtGDuJ9vDA pmqKGgYqu/qmWiNz/9pXxD4pkOpmvu/+ZpXpKv04l1n3oTiKt1pGKep0QdwIXuA+NsUo wYGNkMPI9xzsNT3sYGR9Xbd/q526tvvzh6a9cUGMNJ3kQ0HLqi7/B/3hL/Yf3X6aulUa 5OToks2Q0Vz81c9be5gYT33GoOUD+B757a3/FkwVuB+gf3YS8TZxPiF5o6rYYaVzL4HW kWoR/wk7hbltPp+0nnQ21B8LOb2GDXIaokIt05s0JIjkWNjPf8ASFBWTVMj7w6BgVn2O RUoQ== X-Gm-Message-State: AOUpUlF3SP63F9h12N1V1f5C1kUvrZ5SYjfK7bJVV6wpqBkWBg7bumPA ecM0ES+YXemfaDw1i0xsu8szIg== X-Google-Smtp-Source: AAOMgpe3k19sx6d/ecfImbNmvsCbMNGoxDvXTAX8gIqO6GUeCGXxQfMhztrz1hOPTmpTnsxqwGvosQ== X-Received: by 2002:a17:902:b604:: with SMTP id b4-v6mr3464276pls.18.1531425579813; Thu, 12 Jul 2018 12:59:39 -0700 (PDT) Received: from www.outflux.net (173-164-112-133-Oregon.hfc.comcastbusiness.net. [173.164.112.133]) by smtp.gmail.com with ESMTPSA id a17-v6sm19177455pfg.106.2018.07.12.12.59.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 12 Jul 2018 12:59:38 -0700 (PDT) Date: Thu, 12 Jul 2018 12:59:37 -0700 From: Kees Cook To: Ulf Hansson Cc: Christoph Hellwig , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: mxcmmc: Fix missing parentheses and brace Message-ID: <20180712195937.GA36007@beast> MIME-Version: 1.0 Content-Disposition: inline Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looks like the adjusted syntax wasn't fully build tested. This fixes failures with powerpc builds: drivers/mmc/host/mxcmmc.c: In function ‘mxcmci_swap_buffers’: drivers/mmc/host/mxcmmc.c:296:51: error: expected ‘)’ before ‘;’ token void *buf = kmap_atomic(sg_page(sg) + sg->offset; ^ drivers/mmc/host/mxcmmc.c:299:1: error: expected ‘,’ or ‘;’ before ‘}’ token } ^ Fixes: b189e7589f6d3 ("mmc: mxcmmc: handle highmem pages") Signed-off-by: Kees Cook Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- drivers/mmc/host/mxcmmc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 75f781c11e89..de4e6e5bf304 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -293,9 +293,10 @@ static void mxcmci_swap_buffers(struct mmc_data *data) int i; for_each_sg(data->sg, sg, data->sg_len, i) { - void *buf = kmap_atomic(sg_page(sg) + sg->offset; + void *buf = kmap_atomic(sg_page(sg) + sg->offset); buffer_swap32(buf, sg->length); kunmap_atomic(buf); + } } #else static inline void mxcmci_swap_buffers(struct mmc_data *data) {}