openocd: fix SPDX tag format for files .c
[fw/openocd] / src / flash / nor / avrf.c
index a5a2cbd5b60131d95ae6d935d759bf15c1f746f1..0e2e263ce5d9086595bd86ed46ae8d2421a48243 100644 (file)
@@ -1,19 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
 /***************************************************************************
  *   Copyright (C) 2009 by Simon Qian                                      *
  *   SimonQian@SimonQian.com                                               *
- *                                                                         *
- *   This program is free software; you can redistribute it and/or modify  *
- *   it under the terms of the GNU General Public License as published by  *
- *   the Free Software Foundation; either version 2 of the License, or     *
- *   (at your option) any later version.                                   *
- *                                                                         *
- *   This program is distributed in the hope that it will be useful,       *
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
- *   GNU General Public License for more details.                          *
- *                                                                         *
- *   You should have received a copy of the GNU General Public License     *
- *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
  ***************************************************************************/
 
 #ifdef HAVE_CONFIG_H
@@ -438,13 +427,9 @@ COMMAND_HANDLER(avrf_handle_mass_erase_command)
        if (retval != ERROR_OK)
                return retval;
 
-       if (avrf_mass_erase(bank) == ERROR_OK) {
-               /* set all sectors as erased */
-               for (unsigned int i = 0; i < bank->num_sectors; i++)
-                       bank->sectors[i].is_erased = 1;
-
+       if (avrf_mass_erase(bank) == ERROR_OK)
                command_print(CMD, "avr mass erase complete");
-       else
+       else
                command_print(CMD, "avr mass erase failed");
 
        LOG_DEBUG("%s", __func__);