summaryrefslogtreecommitdiff
path: root/src/commonlib
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2020-05-05 22:49:26 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-05-06 22:20:57 +0000
commitac9590395e0404e1fa1199643a1b28b228f992e5 (patch)
tree6f2bcdfa45e3472484502692cd91cff23d9babed /src/commonlib
parentafd4c876a9b4b1040673e94b7aa1561bf4ad4bc6 (diff)
downloadcoreboot-ac9590395e0404e1fa1199643a1b28b228f992e5.tar.xz
treewide: replace GPLv2 long form headers with SPDX header
This replaces GPLv2-or-later and GPLv2-only long form text with the short SPDX identifiers. Commands used: perl -i -p0e 's|/\*[*\n\t ]*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[;,].*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.*even.*the.*implied.*warranty.*of.*MERCHANTABILITY.*or.*FITNESS.*FOR.*A.*PARTICULAR.*PURPOSE..*.*See.*the.*GNU.*General.*Public.*License for more details.[\n\t ]*\*/|/* SPDX-License-Identifier: GPL-2.0-or-later */|s' $(cat filelist) perl -i -p0e 's|/\*[*\n\t ]*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[;,].*version.*2.+This.*program.*is.*distributed.*in.*the.*hope.*that.*it.*will.*be.*useful,.*but.*;.*without.*even.*the.*implied.*warranty.*of.*MERCHANTABILITY.*or.*FITNESS.*FOR.*A.*PARTICULAR.*PURPOSE..*.*See.*the.*GNU.*General.*Public.*License for more details.[\n\t ]*\*/|/* SPDX-License-Identifier: GPL-2.0-only */|s' $(cat filelist) perl -i -p0e 's|/\*[*\n\t ]*This program is free software[:;].*you.*can.*redistribute.*it.*and/or.*modify.*it.*under.*the.*terms.*of.*the.*GNU.*General.*Public.*License.*version.*2.*as.*published.*by.*the.*Free.*Software.*Foundation[.;,].+This.*program.*is.*distributed.*in.*the.*hope.*that.*it.*will.*be.*useful,.*but.*;.*without.*even.*the.*implied.*warranty.*of.*MERCHANTABILITY.*or.*FITNESS.*FOR.*A.*PARTICULAR.*PURPOSE..*.*See.*the.*GNU.*General.*Public.*License for more details.[\n\t ]*\*/|/* SPDX-License-Identifier: GPL-2.0-only */|s' $(cat filelist) perl -i -p0e 's|/\*[*\n\t ]*This software is licensed under.*the.*terms.*of.*the.*GNU.*General.*Public.*License.*version.*2.*as.*published.*by.*the.*Free.*Software.*Foundation,.+This.*program.*is.*distributed.*in.*the.*hope.*that.*it.*will.*be.*useful,.*but.*;.*without.*even.*the.*implied.*warranty.*of.*MERCHANTABILITY.*or.*FITNESS.*FOR.*A.*PARTICULAR.*PURPOSE..*.*See.*the.*GNU.*General.*Public.*License for more details.[\n\t ]*\*/|/* SPDX-License-Identifier: GPL-2.0-only */|s' $(cat filelist) Change-Id: I7a746088a35633c11fc7ebe86006e96458a1abf8 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41066 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/commonlib')
-rw-r--r--src/commonlib/include/commonlib/loglevel.h12
-rw-r--r--src/commonlib/include/commonlib/sd_mmc_ctrlr.h12
-rw-r--r--src/commonlib/include/commonlib/sdhci.h12
-rw-r--r--src/commonlib/include/commonlib/storage.h12
-rw-r--r--src/commonlib/storage/bouncebuf.c12
-rw-r--r--src/commonlib/storage/bouncebuf.h12
-rw-r--r--src/commonlib/storage/mmc.c12
-rw-r--r--src/commonlib/storage/mmc.h12
-rw-r--r--src/commonlib/storage/pci_sdhci.c12
-rw-r--r--src/commonlib/storage/sd.c12
-rw-r--r--src/commonlib/storage/sd_mmc.c12
-rw-r--r--src/commonlib/storage/sd_mmc.h12
-rw-r--r--src/commonlib/storage/sdhci.c12
-rw-r--r--src/commonlib/storage/sdhci.h12
-rw-r--r--src/commonlib/storage/sdhci_adma.c12
-rw-r--r--src/commonlib/storage/sdhci_display.c12
-rw-r--r--src/commonlib/storage/storage.c12
-rw-r--r--src/commonlib/storage/storage.h12
-rw-r--r--src/commonlib/storage/storage_erase.c12
-rw-r--r--src/commonlib/storage/storage_write.c12
20 files changed, 20 insertions, 220 deletions
diff --git a/src/commonlib/include/commonlib/loglevel.h b/src/commonlib/include/commonlib/loglevel.h
index 30209092fd..7992178e98 100644
--- a/src/commonlib/include/commonlib/loglevel.h
+++ b/src/commonlib/include/commonlib/loglevel.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef LOGLEVEL_H
#define LOGLEVEL_H
diff --git a/src/commonlib/include/commonlib/sd_mmc_ctrlr.h b/src/commonlib/include/commonlib/sd_mmc_ctrlr.h
index d681d2ecb2..a0b2e2b218 100644
--- a/src/commonlib/include/commonlib/sd_mmc_ctrlr.h
+++ b/src/commonlib/include/commonlib/sd_mmc_ctrlr.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Controller independent definitions
*/
diff --git a/src/commonlib/include/commonlib/sdhci.h b/src/commonlib/include/commonlib/sdhci.h
index 2ce3e8a39f..cd76634360 100644
--- a/src/commonlib/include/commonlib/sdhci.h
+++ b/src/commonlib/include/commonlib/sdhci.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* SD host controller specific definitions
*/
diff --git a/src/commonlib/include/commonlib/storage.h b/src/commonlib/include/commonlib/storage.h
index ce5f93acaa..673ae9f613 100644
--- a/src/commonlib/include/commonlib/storage.h
+++ b/src/commonlib/include/commonlib/storage.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __COMMONLIB_STORAGE_H__
#define __COMMONLIB_STORAGE_H__
diff --git a/src/commonlib/storage/bouncebuf.c b/src/commonlib/storage/bouncebuf.c
index 722a6c8d0b..506c723089 100644
--- a/src/commonlib/storage/bouncebuf.c
+++ b/src/commonlib/storage/bouncebuf.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Generic bounce buffer implementation
*/
diff --git a/src/commonlib/storage/bouncebuf.h b/src/commonlib/storage/bouncebuf.h
index 615f73e2f6..bdfb9f8366 100644
--- a/src/commonlib/storage/bouncebuf.h
+++ b/src/commonlib/storage/bouncebuf.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Generic bounce buffer implementation
*/
diff --git a/src/commonlib/storage/mmc.c b/src/commonlib/storage/mmc.c
index d822865053..391b45c341 100644
--- a/src/commonlib/storage/mmc.c
+++ b/src/commonlib/storage/mmc.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* MultiMediaCard (MMC) and eMMC specific support code
* This code is controller independent
diff --git a/src/commonlib/storage/mmc.h b/src/commonlib/storage/mmc.h
index 621c5414b1..aa1af0af33 100644
--- a/src/commonlib/storage/mmc.h
+++ b/src/commonlib/storage/mmc.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __COMMONLIB_STORAGE_MMC_H__
#define __COMMONLIB_STORAGE_MMC_H__
diff --git a/src/commonlib/storage/pci_sdhci.c b/src/commonlib/storage/pci_sdhci.c
index fbc73a8825..839fb34a01 100644
--- a/src/commonlib/storage/pci_sdhci.c
+++ b/src/commonlib/storage/pci_sdhci.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <commonlib/sdhci.h>
#include <device/pci.h>
diff --git a/src/commonlib/storage/sd.c b/src/commonlib/storage/sd.c
index a925088afa..5e74cd2e80 100644
--- a/src/commonlib/storage/sd.c
+++ b/src/commonlib/storage/sd.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Secure Digital (SD) card specific support code
* This code is controller independent
diff --git a/src/commonlib/storage/sd_mmc.c b/src/commonlib/storage/sd_mmc.c
index 8c0c1f7e1d..07e8af8af8 100644
--- a/src/commonlib/storage/sd_mmc.c
+++ b/src/commonlib/storage/sd_mmc.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* MultiMediaCard (MMC), eMMC and Secure Digital (SD) common initialization
* code which brings the card into the standby state. This code is controller
diff --git a/src/commonlib/storage/sd_mmc.h b/src/commonlib/storage/sd_mmc.h
index 9ad2a9e52a..72e3ec313a 100644
--- a/src/commonlib/storage/sd_mmc.h
+++ b/src/commonlib/storage/sd_mmc.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __COMMONLIB_STORAGE_SD_MMC_H__
#define __COMMONLIB_STORAGE_SD_MMC_H__
diff --git a/src/commonlib/storage/sdhci.c b/src/commonlib/storage/sdhci.c
index 231224c556..feef228497 100644
--- a/src/commonlib/storage/sdhci.c
+++ b/src/commonlib/storage/sdhci.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Secure Digital (SD) Host Controller interface specific code
*/
diff --git a/src/commonlib/storage/sdhci.h b/src/commonlib/storage/sdhci.h
index ff0af13f19..61b2e013a6 100644
--- a/src/commonlib/storage/sdhci.h
+++ b/src/commonlib/storage/sdhci.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __COMMONLIB_STORAGE_SDHCI_H__
#define __COMMONLIB_STORAGE_SDHCI_H__
diff --git a/src/commonlib/storage/sdhci_adma.c b/src/commonlib/storage/sdhci_adma.c
index 285ac0f1ec..786a57c512 100644
--- a/src/commonlib/storage/sdhci_adma.c
+++ b/src/commonlib/storage/sdhci_adma.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Secure Digital (SD) Host Controller interface DMA support code
*/
diff --git a/src/commonlib/storage/sdhci_display.c b/src/commonlib/storage/sdhci_display.c
index 6dad33c36e..4d0300e53f 100644
--- a/src/commonlib/storage/sdhci_display.c
+++ b/src/commonlib/storage/sdhci_display.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Secure Digital (SD) Host Controller interface specific code
*/
diff --git a/src/commonlib/storage/storage.c b/src/commonlib/storage/storage.c
index 050d8bfb60..f5d1517cbf 100644
--- a/src/commonlib/storage/storage.c
+++ b/src/commonlib/storage/storage.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* MultiMediaCard (MMC), eMMC and Secure Digital (SD) common code which
* transitions the card from the standby state to the transfer state. The
diff --git a/src/commonlib/storage/storage.h b/src/commonlib/storage/storage.h
index 67e21a40af..28f684de55 100644
--- a/src/commonlib/storage/storage.h
+++ b/src/commonlib/storage/storage.h
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __COMMONLIB_STORAGE_STORAGE_H__
#define __COMMONLIB_STORAGE_STORAGE_H__
diff --git a/src/commonlib/storage/storage_erase.c b/src/commonlib/storage/storage_erase.c
index 2425b765d6..4410687ea6 100644
--- a/src/commonlib/storage/storage_erase.c
+++ b/src/commonlib/storage/storage_erase.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* MultiMediaCard (MMC), eMMC and Secure Digital (SD) erase support code.
* This code is controller independent.
diff --git a/src/commonlib/storage/storage_write.c b/src/commonlib/storage/storage_write.c
index f5af6dc663..216c217202 100644
--- a/src/commonlib/storage/storage_write.c
+++ b/src/commonlib/storage/storage_write.c
@@ -1,15 +1,5 @@
/* This file is part of the coreboot project. */
-/*
- * 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.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* MultiMediaCard (MMC), eMMC and Secure Digital (SD) write support code.
* This code is controller independent.