From: Hans Verkuil <hans.verk...@cisco.com>

drivers/media/pci/ttpci/av7110.c:1226:15: warning: memset with byte count of 
192512

Instead of memsetting this in one go, loop over each line and memset each line
separately.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
---
 drivers/media/pci/ttpci/av7110.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/media/pci/ttpci/av7110.c b/drivers/media/pci/ttpci/av7110.c
index c1f0617..45199a1 100644
--- a/drivers/media/pci/ttpci/av7110.c
+++ b/drivers/media/pci/ttpci/av7110.c
@@ -1219,11 +1219,14 @@ static int stop_ts_capture(struct av7110 *budget)
 
 static int start_ts_capture(struct av7110 *budget)
 {
+       unsigned y;
+
        dprintk(2, "budget: %p\n", budget);
 
        if (budget->feeding1)
                return ++budget->feeding1;
-       memset(budget->grabbing, 0x00, TS_BUFLEN);
+       for (y = 0; y < TS_HEIGHT; y++)
+               memset(budget->grabbing + y * TS_WIDTH, 0x00, TS_WIDTH);
        budget->ttbp = 0;
        SAA7146_ISR_CLEAR(budget->dev, MASK_10);  /* VPE */
        SAA7146_IER_ENABLE(budget->dev, MASK_10); /* VPE */
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to