Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4063780ybf; Tue, 3 Mar 2020 19:12:46 -0800 (PST) X-Google-Smtp-Source: ADFU+vv0cqoWzn0Mw4KWhg8hVH3TrcNotP+7ujbGaau/E3B4TsrHiZOIZPYznfV2X7jzN5GGl5gN X-Received: by 2002:aca:56ca:: with SMTP id k193mr412846oib.133.1583291566628; Tue, 03 Mar 2020 19:12:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583291566; cv=none; d=google.com; s=arc-20160816; b=goVQymTeebYEDb5LQ2WsUrXaVyqq/VjzGyhewpMjooSba15IiGfQNYAQp7nabe8NXd uDr6Jko+g40HZbUty1KH/Sr9bCkD6ekYWoLi1sH7aB5tv8uSu547M6pdcaglxDe69rLn GBG9gR7ETbFtbmlRyLSAQ5y/VvTXN9//mcw5z/SBaZpmG4vuBAKEhiZ39XLwCQhTV4fv Uv/96fAY625LdnrsKOIg3KkSGVXOYnu2yRrlgTbTZretHKn6JYFGd3KMr4Ug3PgZqi8Z qa3hdePcjS/751BBu0kuaYL2k33SDV8qM9A9OH1EVYJ3f1k5MoYY3dKvGgY/QrOrbmLB v/QA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=QzecOlpzzSgPDjmzx2Qy8//vRBogYbhOHmXftx7UDaGlGJbYhxujxMR5G2ZtiwfvM+ IxU5UROSA6uSTqOBrDuYnlB397S88l0iCPQeAPHgXelXLYYWP8SftNeaPy6bRZx+bQl+ /rO4xFvZtdXe+/cbpDlJSIPgWSyOFZ6VDNrusP1hdWacV2ZxHsHKT+1iksICtQZ1lUt+ JT8AnTvrwC33/en+GdktvTh8tXnlLjLt65gx6n+4dCShA6A5we2FYU+cvGpr+Z350vgh Td3WwnhTqHzuoeaox9Yj9Dh4NVv6hYBKdoFiYd/EWWVB1S26ej+KRDNZ3ChETTbXY9pC ODGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=mzDV54eH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si387869otj.24.2020.03.03.19.12.33; Tue, 03 Mar 2020 19:12:46 -0800 (PST) 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=@mediatek.com header.s=dk header.b=mzDV54eH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387651AbgCDDM3 (ORCPT + 99 others); Tue, 3 Mar 2020 22:12:29 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:38104 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S2387609AbgCDDM2 (ORCPT ); Tue, 3 Mar 2020 22:12:28 -0500 X-UUID: 826440239e364b029ea484cf06901dcf-20200304 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=7FGKC2CL96iktvyoBP2vbwLVT6EXR3CbHjrpB2EcLgw=; b=mzDV54eHbuWv4VhGtBiswDYgZSb8SEZVa6dtiWBj3/ddQrO+9b06Dm0Qe+3Y6d6Hto4hHPV9vDTm/Pnol/wpCpFqO39KiA/pvFNc9nhr8CKBl2st8ikQSSBoA5AbTE53zvR+mzGuJqk9QiKCma7db6IWmx2ZB+5wpJ3QazydLA8=; X-UUID: 826440239e364b029ea484cf06901dcf-20200304 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1444323461; Wed, 04 Mar 2020 11:12:20 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 4 Mar 2020 11:11:18 +0800 Received: from mtkswgap22.mediatek.inc (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 4 Mar 2020 11:09:47 +0800 From: To: CC: , , , , , , Light Hsieh Subject: [RESEND PATCH v1 3/3] block: set partition read/write policy according to write-protection status Date: Wed, 4 Mar 2020 11:12:17 +0800 Message-ID: <1583291537-15053-4-git-send-email-light.hsieh@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1583291537-15053-1-git-send-email-light.hsieh@mediatek.com> References: <1583291537-15053-1-git-send-email-light.hsieh@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Content-Transfer-Encoding: base64 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogTGlnaHQgSHNpZWggPGxpZ2h0LmhzaWVoQG1lZGlhdGVrLmNvbT4NCg0KRm9yIHN0b3Jh Z2UgZGV2aWNlIHdpdGggd3JpdGUtcHJvdGVjdGlvbiBzdXBwb3J0LCBlLmcuIGVNTUMsIHJlZ2lz dGVyDQpjaGVja19kaXNrX3JhbmdlX3dwKCkgaW4gc3RydWN0I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